There are certain times when using Laravel that you would like to migrate and seed the database. Typically this is done via the Artisan command line tool with:
php artisan migrate --seed
You can also call this in your code with the following:
Artisan::call('migrate', ['--seed' => true]);
Nice and simple but the second parameter always trips me up.
2 thoughts on “ Call Laravel Artisan Seed From Your Code ”
*seeD in first paragraph
Also possible with: