lwc:programming:php:laravel

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
lwc:programming:php:laravel [2021/09/07 17:16] – created John Harrisonlwc:programming:php:laravel [2021/09/07 20:31] (current) John Harrison
Line 1: Line 1:
 === Add Column to DB === === Add Column to DB ===
   - Have ''artisan'' create php template.   - Have ''artisan'' create php template.
-     * Artisan is a php script itself so you must run this from the directory where ''artisan'' lives (the root directory for the project.+     * Artisan is a php script itself so you must run this from the directory where ''artisan'' lives (the root directory for the project.)
      * Artisan knows how to fill out the template based on the name you give it. Example command: ''php artisan make:migration add_new_fields_to_users_table'' will tell Artisan to base the template off the ''users'' table      * Artisan knows how to fill out the template based on the name you give it. Example command: ''php artisan make:migration add_new_fields_to_users_table'' will tell Artisan to base the template off the ''users'' table
   - in ''database/migrations'' you'll find the file you created. Edit the template using other migrations as a model for what you want   - in ''database/migrations'' you'll find the file you created. Edit the template using other migrations as a model for what you want
   - to run the migration: ''php artisan migrate''   - to run the migration: ''php artisan migrate''
 +[[https://stackoverflow.com/questions/32624530/how-to-add-new-column-in-laravels-default-users-table/32625107|Reference]]
  • lwc/programming/php/laravel.1631052972.txt.gz
  • Last modified: 2021/09/07 17:16
  • by John Harrison