Hello, tell me, is it normal when there are so many requests to the database? Is it possible to pack in one request?
Connection many to many.
public function tags() { return $this->belongsToMany('App\Tag', 'recipe_tags'); } @foreach($recipes as $recipe) @foreach ($recipe->tags as $tag){{$tag->name }} //запросы идут из-за получения тегов рецепта. @endforeach @endforeach