To install Laracasts Test Dummy, run
$ composer require laracasts/testdummy
We should then register the Service Provider, Laracasts\Generators\GeneratorsServiceProvider
in $providers
array of config/app.php
To create a migration with create_posts_table
as its name and user_id
as foreign key
, title
of type string
and body
of type text
using Schema, run
$ php artisan make:migration create_posts_table --schema="user_id:integer:foreign, title:string, body:text"
Note that for the above command to run, you should have Laracasts TestDummy Installed.