Showing posts with label reference. Show all posts
Showing posts with label reference. Show all posts

Laravel eloquent relationships


In laravel you can define all kind of relationships between database tables on the model itself (as in laravel, model is representation of database table), so here's list of eloquent relationships that you can use in laravel model.

php artisan migrate command in Laravel


The 'php artisan migrate' command lets you run the database migration on your application, but there is more than that, there are other variant of this command that you can use such as rollback, reset, refresh, status, install and so on.

How to add and drop indexes in Laravel schema builder


On your laravel database migration you can define indexes for each table that you create, for example you can add primary key, unique value, or just a basic index. All can be done in laravel schema builder.

How to check table column exist or not in Laravel


Besides the 'hasTable' static method, you also have 'hasColumn' method which can check column exist or not on database table of laravel.

Laravel 4.2 schema table column types


These are list of schema table column types that you can use when creating database migration on laravel 4.2, most of these column types also available on laravel 5, this post is just for quick reference.

Category

Category