parameter to laravel seeder

Solutions on MaxInterview for parameter to laravel seeder by the best coders in the world

showing results for - "parameter to laravel seeder"
Atlanta
17 Jun 2019
1class UsersTableSeeder extends Seeder
2{
3    public function run()
4    {
5        $limit = env('SEEDER_LIMIT', 1);
6
7        echo $this->limit;
8    }
9}
10
11//In terminal run:
12SEEDER_LIMIT=10 php artisan db:seed --class=UsersTableSeeder
13