lwc:programming:php:laravel

This is an old revision of the document!


Add Column to DB

  1. 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 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
  2. in database/migrations you'll find the file you created. Edit the template using other migrations as a model for what you want
  3. to run the migration: php artisan migrate
  • lwc/programming/php/laravel.1631052972.txt.gz
  • Last modified: 2021/09/07 17:16
  • by John Harrison