Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespace requires changing if custom path used in config #211

Open
fri3ndly opened this issue Jul 20, 2022 · 2 comments
Open

Namespace requires changing if custom path used in config #211

fri3ndly opened this issue Jul 20, 2022 · 2 comments

Comments

@fri3ndly
Copy link

Love the fact you can change the path for where your seeders get written, however if they're inside a package the namespace also needs changing from

namespace Database\Seeders;

to

namespace Author\PackageName\path\path

Could namespace be another option added to config?

@aytiqaqash
Copy link

How did you change the default path? I see it takes a path of using
public function getSeedPath() { return base_path() . config('iseed::config.path'); }

Not sure how to override it. Maybe you have an example. Didn't find anything in the Readme file.

@aytiqaqash
Copy link

aytiqaqash commented Dec 14, 2022

I got it, just need to create iseed.php in config folder of the app and put inside:
<?php return [ "path" => "/database/seeders/iseeder" ];

Agree it is better to fix namespace issue, but it is because of seed.stub file content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants