laravel create tables code example

Example 1: migrations required field laravel

$table->string('foo')->nullable(false)->change();

Example 2: laravel profile migration tool

php artisan migrate:refresh

php artisan migrate:refresh --seed

Example 3: hwo to create a database table in laravel

php artisan migrate

Example 4: create table laravel

php artisan make:migration create_employeeDetails_table --create=Employee
//goto create_employeeDetails_table file and add fields in table
php artisan migrate

Example 5: hwo to create a database table in laravel

php artisan make:migartion create_users_table

Tags:

Sql Example