mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-28 22:41:13 -05:00
(Update) Game Character Handeling 🚀
This commit is contained in:
@@ -41,6 +41,7 @@ use Illuminate\Support\Facades\DB;
|
||||
use App\Repositories\ChatRepository;
|
||||
use App\Notifications\NewReseedRequest;
|
||||
use MarcReichel\IGDBLaravel\Models\Game;
|
||||
use MarcReichel\IGDBLaravel\Models\Character;
|
||||
use App\Repositories\TorrentFacetedRepository;
|
||||
use Illuminate\Pagination\LengthAwarePaginator as Paginator;
|
||||
|
||||
@@ -936,7 +937,7 @@ class TorrentController extends Controller
|
||||
$characters = null;
|
||||
if ($torrent->category->game_meta) {
|
||||
$meta = Game::with(['cover' => ['url', 'image_id'], 'artworks' => ['url', 'image_id'] ,'genres' => ['name']])->find($torrent->igdb);
|
||||
$characters = Game::with(['characters'])->find($torrent->igdb);
|
||||
$characters = Character::whereIn('games', [$torrent->igdb])->take(6)->get();
|
||||
}
|
||||
|
||||
if ($torrent->featured == 1) {
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
<div class="row cast-list">
|
||||
@if ($characters)
|
||||
@foreach($characters->take(6) as $character)
|
||||
@foreach($characters as $character)
|
||||
<div class="col-xs-4 col-md-2 text-center">
|
||||
<img class="img-people" src="{{ $character->img_url }}">
|
||||
<a href="https://www.themoviedb.org/person/{{ $character->id }}" title="TheMovieDatabase" target="_blank">
|
||||
|
||||
Reference in New Issue
Block a user