سلام. اموزش رو تا دقیقه ۵ جلو اومدم. حالا استاد دستور زیر رو میزنه:
>>> App\\Models\\Video::factory()->create();
این دستور واسه من ارور زیر رو میده:
PHP Error: Class "App\\Models\\Video" not found in Psy Shell code on line 1
اینم کد هایی که توی فایل VideoFactory.php ایجاد شده (پیشفرض خودش هست و دست نخورده)
namespace Database\\Factories;
use Illuminate\\Database\\Eloquent\\Factories\\Factory;
/**
* @extends \\Illuminate\\Database\\Eloquent\\Factories\\Factory<\\App\\Models\\Model>
*/
class VideoFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'name' => 'video title',
'url' => 'https://google.com',
'length' => 120,
'slug' => 'this-is-slug',
'description' => 'this is description'
];
}
}