$ php artisan -V
$ php artisan --version
Laravel Framework 5.8.30
$ php artisan help {Word}
$ php artisan help make:model
Description:
Create a new Eloquent model class
Usage:
make:model [options] [--]
Arguments:
name The name of the class
Options:
-a, --all Generate a migration, factory, and resource controller for the model
-c, --controller Create a new controller for the model
-f, --factory Create a new factory for the model
....
$ php artisan serve
$ php artisan serve --host=192.168.11.56 --port=8000
php artisan meke:{Type} {File Name} --{Option}
make:auth
make:channel
make:command
make:controller
make:event
make:exception
make:factory
make:job
make:listener
make:mail
make:middleware
make:migration
make:model
make:notification
make:observer
make:policy
make:provider
make:request
make:resource
make:rule
make:seeder
make:test
--controller
--resource
--factory
--migration
--all
$ php artisan make:controller {Controller Name} --resource
$ php artisan make:controller {Controller Name} --resource --model=Topic
$ php artisan make:controller {Controller Name} --api
$ php artisan make:model {Model Name}
$ php artisan make:model {Model Name} --all
Factory、Migrationファイルが生成
database/factories/{Model Name}.php
database/migrations/{Model Name}.php
$ php artisan route:list
+--------+----------+----------+------+---------+--------------+
| Domain | Method | URI | Name | Action | Middleware |
+--------+----------+----------+------+---------+--------------+
| | GET|HEAD | / | | Closure | web |
| | GET|HEAD | api/user | | Closure | api,auth:api |
+--------+----------+----------+------+---------+--------------+
以下のコマンドで、resources/views/errors/ にエラー用のbladeファイルが作成される
$ php artisan vendor:publish --tag=laravel-errors