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

Model is not imported correctly in a newly created Import class #3136

Closed
parmonov98 opened this issue Apr 27, 2021 · 3 comments
Closed

Model is not imported correctly in a newly created Import class #3136

parmonov98 opened this issue Apr 27, 2021 · 3 comments

Comments

@parmonov98
Copy link

1️⃣ Is the bug applicable and reproducable to the latest version of the package and hasn't it been reported before? (Currently 3.1.x)
3.1 version

2️⃣ What version of the package, Laravel and PHP do you use? Please provide the FULL version number.
laravel 8.12, PHP 7.4
3️⃣ Describe your issue. Please be short, but concise.
Model is not imported correctly in a newly created Import class

4️⃣ How can the issue be reproduced? Please provide easy-to-reproduce steps (repository, simple code example, failing unit test).
Create a model, Called Student(or any), create a Import class for that model. open the Import class(StudentsImport in my case)
you see use App\Student,

5️⃣ What should be the expected behaviour?
use App\Models\Students

6️⃣ Have you filled in the entire issue template? If not, your issue will be closed. Thanks for using the package! 🙌
yes

@parmonov98 parmonov98 added the bug label Apr 27, 2021
@patrickbrouwers
Copy link
Member

Feel free to PR a solution that detects the model directory, probably can be copied from Laravel somewhere.

@patrickbrouwers
Copy link
Member

For anybody who wants to PR it.
Laravel: GeneratedCommand@qualifyModel
Package WithModelStub@parseModel

@bhavingajjar
Copy link
Contributor

@patrickbrouwers
here is PR for this issue
#3213

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

No branches or pull requests

3 participants