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 make command with folder path has incorrect class path #53141

Closed
JeRabix opened this issue Oct 13, 2024 · 1 comment
Closed

Model make command with folder path has incorrect class path #53141

JeRabix opened this issue Oct 13, 2024 · 1 comment

Comments

@JeRabix
Copy link
Contributor

JeRabix commented Oct 13, 2024

Laravel Version

11.27.2

PHP Version

8.3

Database Driver & Version

No response

Description

If you run the command php artisan make:model Product/ProductTag -f

We will get the ProductTag.php file in the Models/Product folder

But the path for ProductFactory will not be correct

Example:

/** @use HasFactory<\Database\Factories\Product/ProductTagFactory> */
use HasFactory;

Steps To Reproduce

  1. Install laravel
  2. Run make:model command with factory flag and path to folder, example: Product/ProductTag
  3. Open Models/Product/ProductTag.php file
@crynobone
Copy link
Member

PR has been merged.

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