Commit 8e71d994af8fcb2a13d89c41fd3396dfd36b0757

Authored by Андрей Ларионов
1 parent b7b5bcec32

Обновление главной страницы

Showing 2 changed files with 9 additions and 2 deletions Side-by-side Diff

resources/views/index.blade.php
... ... @@ -150,6 +150,8 @@
150 150 </div>
151 151 </div>
152 152 </section>
  153 +
  154 +@if ($news->count())
153 155 <section class="news">
154 156 <div class="container">
155 157 <div class="news__toper">
... ... @@ -167,9 +169,10 @@
167 169 </button>
168 170 </div>
169 171 </div>
  172 +
170 173 <div class="swiper js-news-swiper">
171 174 <div class="swiper-wrapper">
172   - @if ($news->count())
  175 +
173 176 @foreach ($news as $new)
174 177 <div class="swiper-slide">
175 178 <div class="news__item">
... ... @@ -183,13 +186,16 @@
183 186 </div>
184 187 </div>
185 188 @endforeach
186   - @endif
  189 +
187 190 </div>
188 191 <div class="swiper-pagination"></div>
189 192 </div>
190 193 <a href="{{ route('news') }}" class="news__all button button_light">Все новости</a>
  194 +
191 195 </div>
192 196 </section>
  197 +@endif
  198 +
193 199 <section class="info">
194 200 <div class="container">
195 201 <img src="images/5.png" alt="" class="info__pic">
... ... @@ -46,6 +46,7 @@ Route::get(&#39;/&#39;, function () {
46 46 return view('welcome');
47 47 })->name('index');
48 48 */
  49 +
49 50 Route::get('/', [MainController::class, 'index'])->name('index');
50 51  
51 52 //Роуты авторизации, регистрации, восстановления, аутентификации