Commit 365251abd952b50c0597c0a13765db65ac01769e
1 parent
b1ea22485a
Exists in
master
smol fixes
Showing 4 changed files with 10 additions and 4 deletions Side-by-side Diff
app/Http/Controllers/CompanyController.php
... | ... | @@ -28,9 +28,13 @@ class CompanyController extends Controller |
28 | 28 | default: $emps = $emps->orderBy('id')->orderby('updated_at'); break; |
29 | 29 | } |
30 | 30 | } |
31 | + if (is_null($request->get('sort'))){ | |
31 | 32 | |
32 | - $emps = $emps->paginate(4); | |
33 | + $emps = $emps->orderByDesc('created_at')->orderBy('id'); | |
34 | + | |
35 | + } | |
33 | 36 | |
37 | + $emps = $emps->paginate(4); | |
34 | 38 | |
35 | 39 | if ($request->ajax()) { |
36 | 40 | if ($request->get('block') == '1') |
resources/views/companies.blade.php
... | ... | @@ -107,7 +107,7 @@ |
107 | 107 | <option value="name_up">По имени (возрастание)</option> |
108 | 108 | <option value="name_down">По имени (убывание)</option> |
109 | 109 | <option value="created_at_up">По дате (возрастание)</option> |
110 | - <option value="created_at_down">По дате (убывание)</option> | |
110 | + <option value="created_at_down" selected>По дате (убывание)</option> | |
111 | 111 | </select> |
112 | 112 | </div> |
113 | 113 | <button type="button" class="filters__item active" data-tab="1"> |
resources/views/detail_new.blade.php
... | ... | @@ -63,7 +63,7 @@ |
63 | 63 | @endif |
64 | 64 | <time class="thing__date">{{ date('d.m.Y H:i:s', strtotime($Query[0]->created_at)) }}</time> |
65 | 65 | <h1 class="thing__title">{{ $title }}</h1> |
66 | - <p class="thing__text">{{ mb_strimwidth($Query[0]->text, 0, 100, "...") }}</p> | |
66 | + <p class="thing__text">{!! mb_strimwidth($Query[0]->text, 0, 100, "...") !!}</p> | |
67 | 67 | </div> |
68 | 68 | </div> |
69 | 69 | </section> |
resources/views/info_company_new.blade.php
... | ... | @@ -153,7 +153,9 @@ |
153 | 153 | <div class="main__employer-page-item"> |
154 | 154 | <b>Сайт</b> |
155 | 155 | <span> |
156 | - {{ $company[0]->site }} | |
156 | + <a href="{{$company[0]->site}}" target="_blank"> | |
157 | + {{$company[0]->site}} | |
158 | + </a> | |
157 | 159 | </span> |
158 | 160 | </div> |
159 | 161 | <div class="main__employer-page-item"> |