<?php
namespace Modules\Custom\Blog\Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
class PostFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*/
protected $model = \Custom\Modules\Blog\Models\\Post::class;
/**
* Define the model's default state.
*/
public function definition(): array
{
return [];
}
}
Expected Content
Generated protected $model = \Custom\Modules\Blog\Models\Post::class;, ONLY one single separator.
Versions:
Description:
The command
php artisan module:make
generate double namespace separator.Steps To Reproduce:
modules.namespace
=Custom\Modules
php artisan module:make Blog
php artisan module:make-factory Post Blog
Actual Content
Generated double separators
protected $model = \Custom\Modules\Blog\Models\\Post::class;
Expected Content
Generated
protected $model = \Custom\Modules\Blog\Models\Post::class;
, ONLY one single separator.