Reputation: 19695
I developed a Laravel plugin, and, in all my factory classes, I get a warning from Scrutinizer that tells me:
use Xoco70\KendoTournaments\Models\Category;
This use statement conflicts with another class in this namespace, Category, in
$factory->define(Category::class, function (Faker\Generator $faker) { ... }
Thing is I have it defined it package/xoco70/my-plugin/src
and in /vendor/xoco70/my-plugin/src/
Is there something I can do about it?
Upvotes: 2
Views: 144
Reputation: 1379
Try use as
:
use Xoco70\KendoTournaments\Models\Category as XocoCategory;
And the use this alias:
$factory->define(XocoCategory::class, function (Faker\Generator $faker) {
...
}
Upvotes: 1