У меня есть код на ларавел.
Testseeder.php
<?php
namespace Database\Seeders;
use App\Models\Myuser;
use Illuminate\Database\Seeder;
class TestSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Myuser::factory()->count(100)->create();
}
}
TestFactory.php
<?php
namespace Database\Factories;
use App\Models\Myuser;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
class TestFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'lastname' => $this->faker->name(),
'firstname' => $this->faker->firstNameMale(),
'email' => $this->faker->email(),
'phone' => $this->faker->e164PhoneNumber(),
'balance' => $this->faker->name(),
'package' => $this->faker->name(),
'notification' => $this->faker->name(),
'img' => $this->faker->colorName(),
'password' => $this->faker->sha256(),
'ip' => $this->faker->sha1(),
'created_at' => $this->faker->dateTime(),
'updated_at' => $this->faker->dateTime(),
];
}
}
При выполнении кода через командную строку
php artisan db:seed --class=TestSeeder
Получаю ошибку
Class 'Database\Factories\MyuserFactory' not found
Не знаю как исправить.