Generate seeder files dynamically #35978
Unanswered
hamdigaied
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello community,
I'am trying to generate seeder files from controller using
Artisan::call()
and using a test route.Here is code example :
Route::get('test', function() { Artisan::call('make:seeder', [ 'name' => 'TestSeeder' ]); dd(Artisan::output()); });
The seeder file is generated successfully, but the problem is that this code generates other files that I've detected them through GitKraken.

and also after running this screen shows up

does anyone can help me, I want to only generate the seeder file without showing up any popup and without extra files.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions