add a new column to existing table in a migration

To create a migration, you may use the migrate:make command on the Artisan CLI. Use a specific name to avoid clashing with existing models. You then need to use the Schema::table() method (as you’re accessing an existing table, not creating a new one). And you can add a column like this: and don’t forget to add the… Continue reading add a new column to existing table in a migration

Laravel create model, controller and migration in single artisan command

For Laravel 5.6 and older: -m, –migration Create a new migration file for the model.-c, –controller Create a new controller for the model.-r, –resource Indicates if the generated controller should be a resource controller and for Laravel 5.7 and newer: -a, –all Generate a migration, factory, and resource controller for the model or you can… Continue reading Laravel create model, controller and migration in single artisan command