I
$categories = Category::factory(10)->create();
$sources = Source::factory(10)->create();
$i = (int) 0;
while ($i <= 100)
{
$news = News::factory()
->for($categories->random())
->for($sources->random())
->create();
$i++;
}
Size: a a a
I
$categories = Category::factory(10)->create();
$sources = Source::factory(10)->create();
$i = (int) 0;
while ($i <= 100)
{
$news = News::factory()
->for($categories->random())
->for($sources->random())
->create();
$i++;
}
D
$i = (int) 0;🌚
I
ПЛ
D
A
🇬
$comment = Comment::find(1);
return $comment->post->title;
https://laravel.su/docs/8.x/eloquent-relationships#one-to-manyV
A
🇬
🇬
🇬
A
AY
AY
AY
AY
AY
AY