diff --git a/app/Http/Controllers/MainController.php b/app/Http/Controllers/MainController.php index 54fa08d..137759e 100644 --- a/app/Http/Controllers/MainController.php +++ b/app/Http/Controllers/MainController.php @@ -399,13 +399,16 @@ class MainController extends Controller $sort = $request->get('sort'); switch ($sort) { case 'name_up': $Query = $Query->orderBy('title')->orderBy('id'); break; - case 'name_down': $Query = $Query->orderByDesc('title')->orderby('id'); break; - case 'created_at_up': $Query = $Query->OrderBy('created_at')->orderBy('id'); break; - case 'created_at_down': $Query = $Query->orderByDesc('created_at')->orderBy('id'); break; - case 'default': $Query = $Query->orderBy('id')->orderby('updated_at'); break; - default: $Query = $Query->orderBy('id')->orderby('updated_at'); break; + case 'name_down': $Query = $Query->orderByDesc('title')->orderByDesc('id'); break; + case 'created_at_up': $Query = $Query->orderBy('created_at')->orderBy('id'); break; + case 'created_at_down': $Query = $Query->orderByDesc('created_at')->orderByDesc('id'); break; + default: $Query = $Query->orderByDesc('created_at')->orderByDesc('id'); break; } + } else { + $Query = $Query->orderByDesc('created_at')->orderByDesc('id'); } + } else { + $Query = $Query->orderByDesc('created_at')->orderByDesc('id'); } $Query_count = $Query->count(); $Query = $Query->paginate(6); diff --git a/resources/views/detail_new.blade.php b/resources/views/detail_new.blade.php index abf3227..f3d25aa 100644 --- a/resources/views/detail_new.blade.php +++ b/resources/views/detail_new.blade.php @@ -61,9 +61,8 @@ @else {{ $title }} @endif - +

{{ $title }}

-

{!! mb_strimwidth($Query[0]->text, 0, 100, "...") !!}

diff --git a/resources/views/news-list.blade.php b/resources/views/news-list.blade.php index d38e2f4..5b60705 100644 --- a/resources/views/news-list.blade.php +++ b/resources/views/news-list.blade.php @@ -100,15 +100,6 @@

Новости

Информационные блоки и новости о компании и событиях в мире

- @@ -117,17 +108,6 @@
Показано {{ $Query->firstItem() }} – {{ $Query->lastItem() }} из @isset($Query_count) {{ $Query_count }} @else 0 @endisset результатов поиска
-
-
- -
-