poser
poser copied to clipboard
Generator doesn't take into account custom namespaces for factory
My models are in app\Models so the namespace is \App\Models
In the config file I have "models_namespace" => "App\\Models\\",
And I am generating the factories using make:poser -f
so it knows the right namespace.
However the generated factories end up assuming the namespace is just \App
e.g.
<?php
/** @var \Illuminate\Database\Eloquent\Factory $factory */
use App\Company;
use Faker\Generator as Faker;
$factory->define(Company::class, function (Faker $faker) {
return [
//
];
});
Hi @hailwood
I'll take a look into this. Thanks for the bug report! You're a 🌟