defineProps({
tasks: {!! json_encode($tasks) !!},
})
public function genres() {
return $this->belongsToMany(game_genres::class, 'games_games_genres', 'game_name', 'genre_name', 'name', 'name');
}
//Для жанров
public function games() {
return $this->belongsToMany(games::class, 'games_games_genres', 'genre_name', 'game_name', 'name', 'name')->withPivot('genre_name')->withTimestamps();
}