درود
بازدن دستور
php artisan make:factory VideoFactory
برای من در فکتوری عبارت
protected $model = Video::class;
رو نمیسازه. ولی وقتی با tinker میام به مدل و اطلاعات فیک میسازم ، اطلاعات فیک در دیتابیس به درستی میشینه
App\\Models\\Video::factory()->create()
مشکلی در کارم هست؟ ( Laravel v8.78.0 )
اینم کدهای فکتوری هست
namespace Database\\Factories;
use Illuminate\\Database\\Eloquent\\Factories\\Factory;
class VideoFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'name'=> $this->faker->name(),
'url'=>'https://google.com',
'length'=>120,
'slug'=>$this->faker->slug()
];
}
}