Skip to content

Commit

Permalink
fix(nofuzy-api): fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
alihardan committed May 20, 2024
1 parent 0438c1b commit c9a6ffb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/PublicApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function nofuzy1()
$games = Game::with(['producers:slug,title_fa,title_en', 'publishers:slug,title_fa,title_en'])->latest()->get();
echo "id,tilte_en,title_fa,publisher\n";
$games->each(function ($game) {
echo $game->id . "," . ($game->title_en ?? $game->games[0]['title_en'][0] ?? '') . "," . ($game->title_fa ?? $game->games[0]['title_fa'][0] ?? '') . "," . $game->publishers[0]->title_fa[0] ?? '' . "\n";
echo $game->id . "," . ($game->title_en ?? $game->games[0]['title_en'][0] ?? '') . "," . ($game->title_fa ?? $game->games[0]['title_fa'][0] ?? '') . "," . ($game->publishers->first()?->title_fa[0] ?? '') . "\n";
});
}
}

0 comments on commit c9a6ffb

Please sign in to comment.