Interested in the possibility of implementing the transfer variable to the class when called from the command line

php artisan db:seed --class=MyClass 

Or when calling from files, in fact the same thing ..

 Artisan::call('db:seed', [ 'class' => 'MyClass' ]); 

Are there any built-in features? Or what to do for this?

How ugly will editing and entering the necessary function in SeedCommand.php be?

  • What exactly do you want? Make your team or something with sider? - Yaroslav Molchan
  • @YaroslavMolchan, I want the team to pass the variable to 'MyClass', for example "php artisan db: seed --class = MyClass --arg = 3" - Vladimir Alexandrov
  • Why other arguments? - Yaroslav Molchan
  • @YaroslavMolchan, for example, how many lines to fill in with faker fom, or is it done differently? - Vladimir Alexandrov
  • Make a few siders, but in general it is strange, usually the sider perform in the beginning and that's it - Yaroslav Molchan

0