📜  laravel 播种机的参数 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:12.256000             🧑  作者: Mango

代码示例1
class UsersTableSeeder extends Seeder
{
    public function run()
    {
        $limit = env('SEEDER_LIMIT', 1);

        echo $this->limit;
    }
}

//In terminal run:
SEEDER_LIMIT=10 php artisan db:seed --class=UsersTableSeeder