0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

php artisan コマンド make:○○

Last updated at Posted at 2020-03-23

migration作成

# migrationの後の名前は任意(わかりやすいようにcreate_xxx_tableにしている)
php artisan make:migrtion create_xxxx_table 

migration実行

php artisan migrate

Model作成

php artisan make:model Model名

シード作成

php artisan make:seeder XxxxSeeder

作成したシードファイルにダミーデータの作成コードを記載した後に
DatabaseSeeder.phpに設定する必要があるため下記のように設定する

DatabaseSeeder.php
    public function run()
    {	 # シードを作成する度ここに追加していく
        $this->call(XxxxSeeder::class);
    }

シードの実行

php artisan db:seed

RESTコントローラ作成

php artisan make:controller XxxxController --resource
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?