diff --git a/app/Http/Controllers/Bo/TopMediaController.php b/app/Http/Controllers/Bo/TopMediaController.php index df4f05c..abab9e8 100644 --- a/app/Http/Controllers/Bo/TopMediaController.php +++ b/app/Http/Controllers/Bo/TopMediaController.php @@ -41,9 +41,7 @@ class TopMediaController extends Controller ); } //end if - $this->sortQuery($topMediaList); $searchFields = trans('Id Instagram, Participant, Lien'); - $topMediaList->orderBy('updated_at', 'DESC'); $topMediaList = $topMediaList->paginate(); return \view('bo.pages.top-media.index', \compact('topMediaList', 'searchFields', 'ranking')); diff --git a/resources/views/bo/pages/top-media/indexList.blade.php b/resources/views/bo/pages/top-media/indexList.blade.php index 0e156b1..a07af18 100644 --- a/resources/views/bo/pages/top-media/indexList.blade.php +++ b/resources/views/bo/pages/top-media/indexList.blade.php @@ -2,48 +2,46 @@ @php - $cols = [ - 'id' => __('Classement'), - 'username' => __('Participant'), - 'timestamp' => __('Date de création du post')]; - $routeName = request()->route()->getName(); - $rst = !is_null(request()->rst) || !Session::has("$routeName.sorted"); - $noOrder = Session::get("$routeName.sort_col") !== 'order' and (Session::has("$routeName.sort_col") or Session::has("$routeName.sort_way")); - $noOrder = Session::get("$routeName.sort_col") !== '' and (Session::has("$routeName.sort_col") or Session::has("$routeName.sort_way")); + $cols = [ + 'id' => __('Classement'), + 'username' => __('Participant'), + 'timestamp' => __('Date de création du post')]; + $routeName = request()->route()->getName(); + $rst = !is_null(request()->rst) || !Session::has("$routeName.sorted"); + $noOrder = Session::get("$routeName.sort_col") !== 'order' and (Session::has("$routeName.sort_col") or Session::has("$routeName.sort_way")); + $noOrder = Session::get("$routeName.sort_col") !== '' and (Session::has("$routeName.sort_col") or Session::has("$routeName.sort_way")); @endphp - @include('modules.table-col-sorter', [ - 'cols' => $cols, - 'ignore' => ['total', 'timeslot_date', 'shop'], - 'mobileHide' => ['shop'], - ]) + + + + @if ($topMediaList->count()) - @foreach ($topMediaList as $topMediaModel) - - - - - - - @endforeach + @foreach ($topMediaList as $topMediaModel) + + + + + + + @endforeach @else - - - + + + @endif
ClassementParticipantDate de création du post
- #{{ $ranking->get($topMediaModel->insta_id) + 1 }} - {{ $topMediaModel->username }} - {{ $topMediaModel->timestamp->isoFormat('LLLL') }} - - - - -
+ #{{ $ranking->get($topMediaModel->insta_id) + 1 }} + {{ $topMediaModel->username }} + {{ $topMediaModel->timestamp->isoFormat('LLLL') }} + + + + +
- {{ __('Aucun résultat pour les :models', ['models' => __('models.classes.insta_media')]) }} - -
+ {{ __('Aucun résultat pour les :models', ['models' => __('models.classes.insta_media')]) }} + +
- + \ No newline at end of file