Commit 9a5d84dc0df46d7dc91edbe9e5879c0a5ee34ea3

Authored by Андрей Ларионов
1 parent d65c792256
Exists in master

Авторизация и регистрация. Фильтрация и сортировка на странице категории

Showing 14 changed files with 268 additions and 580 deletions Inline Diff

1 <IfModule mod_rewrite.c> 1 <IfModule mod_rewrite.c>
2 RewriteEngine on 2 RewriteEngine on
3 RewriteCond %{REQUEST_URI} !^public
4 RewriteRule ^(.*)$ public/$1 [L] 3 RewriteRule ^(.*)$ public/$1 [L]
4 RewriteCond %{REQUEST_FILENAME} !-d
5 RewriteCond %{REQUEST_FILENAME} !-f
6 RewriteRule ^ index.php [L]
app/Http/Controllers/LoginController.php
1 <?php 1 <?php
2 2
3 namespace App\Http\Controllers; 3 namespace App\Http\Controllers;
4 4
5 use Illuminate\Http\Request; 5 use Illuminate\Http\Request;
6 use Illuminate\Support\Facades\Auth; 6 use Illuminate\Support\Facades\Auth;
7 7
8 class LoginController extends Controller 8 class LoginController extends Controller
9 { 9 {
10 public function __construct() { 10 public function __construct() {
11 //$this->middleware('guest')->except('logout'); 11 $this->middleware('guest')->except('logout');
12 } 12 }
13 13
14 //Форма входа 14 //Форма входа
15 public function login() { 15 public function login() {
16 return view('auth.login'); 16 return view('auth.login');
17 } 17 }
18 18
19 // Аутентификация 19 // Аутентификация
20 public function autenticate(Request $request) { 20 public function autenticate(Request $request) {
21 $request->validate([ 21 $request->validate([
22 'email' => 'required|string|email', 22 'email' => 'required|string|email',
23 'password' => 'required|string', 23 'password' => 'required|string',
24 ]); 24 ]);
25 25
26 $credentials = $request->only('email', 'password'); 26 $credentials = $request->only('email', 'password');
27 27
28 if (Auth::attempt($credentials, $request->has('remember'))) { 28 if (Auth::attempt($credentials, $request->has('remember'))) {
29 if (is_null(Auth::user()->email_verified_at)){ 29 if (is_null(Auth::user()->email_verified_at)){
30 Auth::logout(); 30 Auth::logout();
31 return redirect() 31 return redirect()
32 ->route('auth.vefiry-message') 32 ->route('auth.vefiry-message')
33 ->withErrors('Адрес почты не подтвержден'); 33 ->withErrors('Адрес почты не подтвержден');
34 } 34 }
35 35
36 return redirect() 36 return redirect()
37 ->route('user.index') 37 ->route('user.index')
38 ->with('success', 'Вы вошли в личный кабинет.'); 38 ->with('success', 'Вы вошли в личный кабинет.');
39 } 39 }
40 40
41 return redirect() 41 return redirect()
42 ->route('auth.login') 42 ->route('auth.login')
43 ->withErrors('Неверный логин или пароль!'); 43 ->withErrors('Неверный логин или пароль!');
44 } 44 }
45 45
46 // Выход 46 // Выход
47 public function logout() { 47 public function logout() {
48 Auth::logout(); 48 Auth::logout();
49 return redirect()->route('index') 49 return redirect()->route('index')
50 ->with('success', 'Вы вышли из личного кабинета'); 50 ->with('success', 'Вы вышли из личного кабинета');
51 } 51 }
52 } 52 }
53 53
app/Http/Controllers/MainController.php
1 <?php 1 <?php
2 2
3 namespace App\Http\Controllers; 3 namespace App\Http\Controllers;
4 4
5 use App\Models\Area; 5 use App\Models\Area;
6 use App\Models\format_area; 6 use App\Models\format_area;
7 use App\Models\House; 7 use App\Models\House;
8 use App\Models\News; 8 use App\Models\News;
9 use App\Models\Partners; 9 use App\Models\Partners;
10 use App\Models\type_area; 10 use App\Models\type_area;
11 use Illuminate\Http\Request; 11 use Illuminate\Http\Request;
12 use App\Classes\RusDate; 12 use App\Classes\RusDate;
13 use PhpParser\Node\Stmt\Switch_; 13 use PhpParser\Node\Stmt\Switch_;
14 use Illuminate\Support\Facades\Response; 14 use Illuminate\Support\Facades\Response;
15 15
16 class MainController extends Controller 16 class MainController extends Controller
17 { 17 {
18 /* 18 /*
19 * Главная страница проекта 19 * Главная страница проекта
20 */ 20 */
21 public function index() { 21 public function index() {
22 $houses = House::with('areas')->orderByDesc('created_at')->limit(8)->get(); 22 $houses = House::with('areas')->orderByDesc('created_at')->limit(8)->get();
23 $news = News::query()->orderByDesc('created_at')->limit(8)->get(); 23 $news = News::query()->orderByDesc('created_at')->limit(8)->get();
24 $partners = Partners::query()->limit(18)->get(); 24 $partners = Partners::query()->limit(18)->get();
25 return view('index', compact('houses', 'news', 'partners')); 25 return view('index', compact('houses', 'news', 'partners'));
26 } 26 }
27 27
28 /* 28 /*
29 * Фильтр ajax в каталоге 29 * Фильтр ajax в каталоге
30 */ 30 */
31 public function catalog_ajax_filter(Request $request) { 31 public function catalog_ajax_filter(Request $request) {
32 $Res = Array(); 32 $Res = Array();
33 if (!empty($request->area)) { 33 if (!empty($request->area)) {
34 $area_table = Area::where('id', '=', $request->area)->get(); 34 $area_table = Area::where('id', '=', $request->area)->get();
35 $Res[] = $area_table[0]->name_area; 35 $Res[] = $area_table[0]->name_area;
36 } else { 36 } else {
37 $Res[] = "Все объекты"; 37 $Res[] = "Все объекты";
38 } 38 }
39 39
40 if (!empty($request->type_area)) { 40 if (!empty($request->type_area)) {
41 $type_area_table = type_area::where('id', '=', $request->type_area)->get(); 41 $type_area_table = type_area::where('id', '=', $request->type_area)->get();
42 $Res[] = $type_area_table[0]->name_type; 42 $Res[] = $type_area_table[0]->name_type;
43 } else { 43 } else {
44 $Res[] = "Тип недвижимости"; 44 $Res[] = "Тип недвижимости";
45 } 45 }
46 46
47 if (!empty($request->format_area)) { 47 if (!empty($request->format_area)) {
48 $format_area_table = format_area::where('id', '=', $request->format_area)->get(); 48 $format_area_table = format_area::where('id', '=', $request->format_area)->get();
49 $Res[] = $format_area_table[0]->name_format; 49 $Res[] = $format_area_table[0]->name_format;
50 } else { 50 } else {
51 $Res[] = "Формат недвижимости"; 51 $Res[] = "Формат недвижимости";
52 } 52 }
53 53
54 return json_encode($Res); 54 return json_encode($Res);
55 } 55 }
56 56
57 /* 57 /*
58 * Страница ЖК 58 * Страница ЖК
59 */ 59 */
60 public function Complex(Area $area, Request $request) { 60 public function Complex(Area $area, Request $request) {
61 //////////раздел аренда 61 //////////раздел аренда
62 $house_arenda = House::with('areas')-> 62 $house_arenda = House::with('areas')->
63 where('area_id', '=', $area->id)-> 63 where('area_id', '=', $area->id)->
64 where('format_house', '=', 'Аренда'); 64 where('format_house', '=', 'Аренда');
65 65
66 if ($request->view == 'arenda') { 66 if ($request->view == 'arenda') {
67 switch ($request->sort_price) { 67 switch ($request->sort_price) {
68 case 1: $house_arenda = $house_arenda->orderBy('price');break; 68 case 1: $house_arenda = $house_arenda->orderBy('price');break;
69 case 2: $house_arenda = $house_arenda->orderByDesc('price');break; 69 case 2: $house_arenda = $house_arenda->orderByDesc('price');break;
70 } 70 }
71 switch ($request->sort_new) { 71 switch ($request->sort_new) {
72 case 1: $house_arenda = $house_arenda->orderByDesc('created_at');break; 72 case 1: $house_arenda = $house_arenda->orderByDesc('created_at');break;
73 case 2: $house_arenda = $house_arenda->orderBy('created_at');break; 73 case 2: $house_arenda = $house_arenda->orderBy('created_at');break;
74 } 74 }
75 switch ($request->sort_area) { 75 switch ($request->sort_area) {
76 case 1: $house_arenda = $house_arenda->orderByDesc('area')->get();break; 76 case 1: $house_arenda = $house_arenda->orderByDesc('area')->get();break;
77 case 2: $house_arenda = $house_arenda->orderBy('area')->get();break; 77 case 2: $house_arenda = $house_arenda->orderBy('area')->get();break;
78 } 78 }
79 } else { 79 } else {
80 $house_arenda = $house_arenda->orderBy('price')-> 80 $house_arenda = $house_arenda->orderBy('price')->
81 orderByDesc('created_at')-> 81 orderByDesc('created_at')->
82 orderByDesc('area')->get(); 82 orderByDesc('area')->get();
83 } 83 }
84 84
85 ////////раздел продажа 85 ////////раздел продажа
86 $house_prodaja = House::with('areas')-> 86 $house_prodaja = House::with('areas')->
87 where('area_id', '=', $area->id)-> 87 where('area_id', '=', $area->id)->
88 where('format_house', '=', 'Продажа'); 88 where('format_house', '=', 'Продажа');
89 89
90 if ($request->view == 'prodaja') { 90 if ($request->view == 'prodaja') {
91 switch ($request->sort_price) { 91 switch ($request->sort_price) {
92 case 1: $house_prodaja = $house_prodaja->orderBy('price');break; 92 case 1: $house_prodaja = $house_prodaja->orderBy('price');break;
93 case 2: $house_prodaja = $house_prodaja->orderByDesc('price');break; 93 case 2: $house_prodaja = $house_prodaja->orderByDesc('price');break;
94 } 94 }
95 switch ($request->sort_new) { 95 switch ($request->sort_new) {
96 case 1: $house_prodaja = $house_prodaja->orderByDesc('created_at');break; 96 case 1: $house_prodaja = $house_prodaja->orderByDesc('created_at');break;
97 case 2: $house_prodaja = $house_prodaja->orderBy('created_at');break; 97 case 2: $house_prodaja = $house_prodaja->orderBy('created_at');break;
98 } 98 }
99 switch ($request->sort_area) { 99 switch ($request->sort_area) {
100 case 1: $house_prodaja = $house_prodaja->orderByDesc('area')->get();break; 100 case 1: $house_prodaja = $house_prodaja->orderByDesc('area')->get();break;
101 case 2: $house_prodaja = $house_prodaja->orderBy('area')->get();break; 101 case 2: $house_prodaja = $house_prodaja->orderBy('area')->get();break;
102 } 102 }
103 } else { 103 } else {
104 $house_prodaja = $house_prodaja->orderBy('price')-> 104 $house_prodaja = $house_prodaja->orderBy('price')->
105 orderByDesc('created_at')-> 105 orderByDesc('created_at')->
106 orderByDesc('area')->get(); 106 orderByDesc('area')->get();
107 } 107 }
108 108
109 //////////////// Раздел бизнеса 109 //////////////// Раздел бизнеса
110 $house_bissnes = House::with('areas')-> 110 $house_bissnes = House::with('areas')->
111 where('area_id', '=', $area->id)-> 111 where('area_id', '=', $area->id)->
112 where('format_house', '=', 'Бизнес'); 112 where('format_house', '=', 'Бизнес');
113 //orderByDesc('created_at')->get(); 113 //orderByDesc('created_at')->get();
114 114
115 if ($request->view == 'bissnes') { 115 if ($request->view == 'bissnes') {
116 switch ($request->sort_price) { 116 switch ($request->sort_price) {
117 case 1: $house_bissnes = $house_bissnes->orderBy('price');break; 117 case 1: $house_bissnes = $house_bissnes->orderBy('price');break;
118 case 2: $house_bissnes = $house_bissnes->orderByDesc('price');break; 118 case 2: $house_bissnes = $house_bissnes->orderByDesc('price');break;
119 } 119 }
120 switch ($request->sort_new) { 120 switch ($request->sort_new) {
121 case 1: $house_bissnes = $house_bissnes->orderByDesc('created_at');break; 121 case 1: $house_bissnes = $house_bissnes->orderByDesc('created_at');break;
122 case 2: $house_bissnes = $house_bissnes->orderBy('created_at');break; 122 case 2: $house_bissnes = $house_bissnes->orderBy('created_at');break;
123 } 123 }
124 switch ($request->sort_area) { 124 switch ($request->sort_area) {
125 case 1: $house_bissnes = $house_bissnes->orderByDesc('area')->get();break; 125 case 1: $house_bissnes = $house_bissnes->orderByDesc('area')->get();break;
126 case 2: $house_bissnes = $house_bissnes->orderBy('area')->get();break; 126 case 2: $house_bissnes = $house_bissnes->orderBy('area')->get();break;
127 } 127 }
128 } else { 128 } else {
129 $house_bissnes = $house_bissnes->orderBy('price')-> 129 $house_bissnes = $house_bissnes->orderBy('price')->
130 orderByDesc('created_at')-> 130 orderByDesc('created_at')->
131 orderByDesc('area')->get(); 131 orderByDesc('area')->get();
132 } 132 }
133 133
134 //////////раздел арендованные 134 //////////раздел арендованные
135 $house_arendovannie = House::with('areas')-> 135 $house_arendovannie = House::with('areas')->
136 where('area_id', '=', $area->id)-> 136 where('area_id', '=', $area->id)->
137 where('format_house', '=', 'Арендованные'); 137 where('format_house', '=', 'Арендованные');
138 //orderByDesc('created_at')->get(); 138 //orderByDesc('created_at')->get();
139 139
140 if ($request->view == 'arendovannie') { 140 if ($request->view == 'arendovannie') {
141 switch ($request->sort_price) { 141 switch ($request->sort_price) {
142 case 1: $house_arendovannie = $house_arendovannie->orderBy('price');break; 142 case 1: $house_arendovannie = $house_arendovannie->orderBy('price');break;
143 case 2: $house_arendovannie = $house_arendovannie->orderByDesc('price');break; 143 case 2: $house_arendovannie = $house_arendovannie->orderByDesc('price');break;
144 } 144 }
145 switch ($request->sort_new) { 145 switch ($request->sort_new) {
146 case 1: $house_arendovannie = $house_arendovannie->orderByDesc('created_at');break; 146 case 1: $house_arendovannie = $house_arendovannie->orderByDesc('created_at');break;
147 case 2: $house_arendovannie = $house_arendovannie->orderBy('created_at');break; 147 case 2: $house_arendovannie = $house_arendovannie->orderBy('created_at');break;
148 } 148 }
149 switch ($request->sort_area) { 149 switch ($request->sort_area) {
150 case 1: $house_arendovannie = $house_arendovannie->orderByDesc('area')->get();break; 150 case 1: $house_arendovannie = $house_arendovannie->orderByDesc('area')->get();break;
151 case 2: $house_arendovannie = $house_arendovannie->orderBy('area')->get();break; 151 case 2: $house_arendovannie = $house_arendovannie->orderBy('area')->get();break;
152 } 152 }
153 } else { 153 } else {
154 $house_arendovannie = $house_arendovannie->orderBy('price')-> 154 $house_arendovannie = $house_arendovannie->orderBy('price')->
155 orderByDesc('created_at')-> 155 orderByDesc('created_at')->
156 orderByDesc('area')->get(); 156 orderByDesc('area')->get();
157 } 157 }
158 158
159 if ($request->ajax()) { 159 if ($request->ajax()) {
160 switch($request->view) { 160 switch($request->view) {
161 case 'arenda': return view('ajax.complex.arenda', compact('house_arenda')); break; 161 case 'arenda': return view('ajax.complex.arenda', compact('house_arenda')); break;
162 case 'prodaja': return view('ajax.complex.prodaja', compact('house_prodaja'));break; 162 case 'prodaja': return view('ajax.complex.prodaja', compact('house_prodaja'));break;
163 case 'bissnes': return view('ajax.complex.bissnes', compact('house_bissnes')); break; 163 case 'bissnes': return view('ajax.complex.bissnes', compact('house_bissnes')); break;
164 case 'arendovannie': return view('ajax.complex.arendovannie', compact('house_arendovannie')); break; 164 case 'arendovannie': return view('ajax.complex.arendovannie', compact('house_arendovannie')); break;
165 } 165 }
166 } 166 }
167 167
168 return view('complex', compact('area', 168 return view('complex', compact('area',
169 'house_arenda', 169 'house_arenda',
170 'house_prodaja', 170 'house_prodaja',
171 'house_bissnes', 171 'house_bissnes',
172 'house_arendovannie')); 172 'house_arendovannie'));
173 173
174 } 174 }
175 175
176 /* 176 /*
177 * О компании 177 * О компании
178 */ 178 */
179 public function About() { 179 public function About() {
180 return view('about'); 180 return view('about');
181 } 181 }
182 182
183 /* 183 /*
184 * Избранное 184 * Избранное
185 */ 185 */
186 public function Favorite() { 186 public function Favorite() {
187 return view('favorite'); 187 return view('favorite');
188 } 188 }
189 189
190 public function Category_ajax($cat, Request $request) {
191 return $cat;
192 }
193
190 /* 194 /*
191 * Категории каталога Аренда/Продажа/Бизнес 195 * Категории каталога Аренда/Продажа/Бизнес
192 */ 196 */
193 public function Category($cat, Request $request) { 197 public function Category($cat, Request $request) {
194 switch ($cat) { 198 switch ($cat) {
195 case 'arenda': 199 case 'arenda':
196 $title = "Аренда торговых помещениий"; 200 $title = "Аренда торговых помещениий";
197 $format_house = 'Аренда'; 201 $format_house = 'Аренда';
198 break; 202 break;
199 case 'sale': 203 case 'sale':
200 $title = "Продажа торговых помещений"; 204 $title = "Продажа торговых помещений";
201 $format_house = 'Продажа'; 205 $format_house = 'Продажа';
202 break; 206 break;
203 case 'bussiness': 207 case 'bussiness':
204 $title = "Арендый бизнес"; 208 $title = "Арендый бизнес";
205 $format_house = 'Бизнес'; 209 $format_house = 'Бизнес';
206 break; 210 break;
207 default: 211 default:
208 $title = "Аренда торговых помещениий"; 212 $title = "Аренда торговых помещениий";
209 $format_house = 'Аренда'; 213 $format_house = 'Аренда';
210 break; 214 break;
211 } 215 }
212 216
213 $houses = House::with('areas')-> 217 $houses = House::with('areas')->
214 where('format_house', '=', $format_house)->paginate(4)->appends(request()->query()); 218 where('format_house', '=', $format_house);
215 //->appends(request()->query()); 219 //->appends(request()->query());
220 /*
221 if (!empty($request->area)) {
222 $houses = $houses->where('area_id', '=', $request->area);
223 }
224 // условия поиска по типу недвижимости
225 if (!empty($request->type_area)) {
226 $houses = $houses->where('type_area_id', '=', $request->type_area);
227 }
228 // условия поиска по формату недвижимости
229 if (!empty($request->format_area)) {
230 $houses = $houses->where('format_area_id', '=', $request->format_area);
231 }
232 // условия поиска по площади - минимальная площадь
233 if (!empty($request->area_m2_min)) {
234 $houses = $houses->where('area', '>', $request->area_m2_min);
235 }
236 // условия поиска по площади - максимальная площадь
237 if (!empty($request->area_m2_max)) {
238 $houses = $houses->where('area', '<', $request->area_m2_max);
239 }
240 // условия поиска по цене - минимальная цена
241 if (!empty($request->price_min)) {
242 $houses = $houses->where('price', '>', $request->price_min);
243 }
244 // условия поиска по цене - максимальная цена
245 if (!empty($request->price_max)) {
246 $houses = $houses->where('price', '<', $request->price_max);
247 }
248 // условия поиска по адресу
249 if (!empty($request->address)) {
250 $houses = $houses->where('address', 'LIKE', "%".$request->address."%");
251 }
252
253 if (!empty($request->sort_price)) {
254 switch ($request->sort_price) {
255 case 1: $houses = $houses->orderBy('price');break;
256 case 2: $houses = $houses->orderByDesc('price');break;
257 }
258 switch ($request->sort_new) {
259 case 1: $houses = $houses->orderByDesc('created_at');break;
260 case 2: $houses = $houses->orderBy('created_at');break;
261 }
262 switch ($request->sort_area) {
263 case 1: $houses = $houses->orderByDesc('area')->get();break;
264 case 2: $houses = $houses->orderBy('area')->get();break;
265 }
266 } else {
267 $houses = $houses->orderBy('price')->
268 orderByDesc('created_at')->
269 orderByDesc('area');
270 }
271 */
272 $houses = $houses->paginate(4);
273
274 if ($request->ajax()) {
275 return view('ajax.complex.category', compact('houses'));
276 }
216 277
217 return view('category_catalog', compact('title', 'houses')); 278 return view('category_catalog', compact('title', 'cat', 'houses'));
218 } 279 }
219 280
220 281
221 /* 282 /*
222 * Каталог 283 * Каталог
223 */ 284 */
224 public function Catalog(Request $request) { 285 public function Catalog(Request $request) {
225 286
226 //////////раздел аренда///////////////////////////////////////////////////////////////// 287 //////////раздел аренда/////////////////////////////////////////////////////////////////
227 $house_arenda = House::with('areas')-> 288 $house_arenda = House::with('areas')->
228 where('format_house', '=', 'Аренда'); 289 where('format_house', '=', 'Аренда');
229 // условия поиска по объектам комплексов 290 // условия поиска по объектам комплексов
230 if (!empty($request->area)) { 291 if (!empty($request->area)) {
231 $house_arenda = $house_arenda->where('area_id', '=', $request->area); 292 $house_arenda = $house_arenda->where('area_id', '=', $request->area);
232 } 293 }
233 // условия поиска по типу недвижимости 294 // условия поиска по типу недвижимости
234 if (!empty($request->type_area)) { 295 if (!empty($request->type_area)) {
235 $house_arenda = $house_arenda->where('type_area_id', '=', $request->type_area); 296 $house_arenda = $house_arenda->where('type_area_id', '=', $request->type_area);
236 } 297 }
237 // условия поиска по формату недвижимости 298 // условия поиска по формату недвижимости
238 if (!empty($request->format_area)) { 299 if (!empty($request->format_area)) {
239 $house_arenda = $house_arenda->where('format_area_id', '=', $request->format_area); 300 $house_arenda = $house_arenda->where('format_area_id', '=', $request->format_area);
240 } 301 }
241 // условия поиска по площади - минимальная площадь 302 // условия поиска по площади - минимальная площадь
242 if (!empty($request->area_m2_min)) { 303 if (!empty($request->area_m2_min)) {
243 $house_arenda = $house_arenda->where('area', '>', $request->area_m2_min); 304 $house_arenda = $house_arenda->where('area', '>', $request->area_m2_min);
244 } 305 }
245 // условия поиска по площади - максимальная площадь 306 // условия поиска по площади - максимальная площадь
246 if (!empty($request->area_m2_max)) { 307 if (!empty($request->area_m2_max)) {
247 $house_arenda = $house_arenda->where('area', '<', $request->area_m2_max); 308 $house_arenda = $house_arenda->where('area', '<', $request->area_m2_max);
248 } 309 }
249 // условия поиска по цене - минимальная цена 310 // условия поиска по цене - минимальная цена
250 if (!empty($request->price_min)) { 311 if (!empty($request->price_min)) {
251 $house_arenda = $house_arenda->where('price', '>', $request->price_min); 312 $house_arenda = $house_arenda->where('price', '>', $request->price_min);
252 } 313 }
253 // условия поиска по цене - максимальная цена 314 // условия поиска по цене - максимальная цена
254 if (!empty($request->price_max)) { 315 if (!empty($request->price_max)) {
255 $house_arenda = $house_arenda->where('price', '<', $request->price_max); 316 $house_arenda = $house_arenda->where('price', '<', $request->price_max);
256 } 317 }
257 // условия поиска по адресу 318 // условия поиска по адресу
258 if (!empty($request->address)) { 319 if (!empty($request->address)) {
259 $house_arenda = $house_arenda->where('address', 'LIKE', "%".$request->address."%"); 320 $house_arenda = $house_arenda->where('address', 'LIKE', "%".$request->address."%");
260 } 321 }
261 322
262 if ($request->view == 'arenda') { 323 if ($request->view == 'arenda') {
263 switch ($request->sort_price) { 324 switch ($request->sort_price) {
264 case 1: $house_arenda = $house_arenda->orderBy('price');break; 325 case 1: $house_arenda = $house_arenda->orderBy('price');break;
265 case 2: $house_arenda = $house_arenda->orderByDesc('price');break; 326 case 2: $house_arenda = $house_arenda->orderByDesc('price');break;
266 } 327 }
267 switch ($request->sort_new) { 328 switch ($request->sort_new) {
268 case 1: $house_arenda = $house_arenda->orderByDesc('created_at');break; 329 case 1: $house_arenda = $house_arenda->orderByDesc('created_at');break;
269 case 2: $house_arenda = $house_arenda->orderBy('created_at');break; 330 case 2: $house_arenda = $house_arenda->orderBy('created_at');break;
270 } 331 }
271 switch ($request->sort_area) { 332 switch ($request->sort_area) {
272 case 1: $house_arenda = $house_arenda->orderByDesc('area')->get();break; 333 case 1: $house_arenda = $house_arenda->orderByDesc('area')->get();break;
273 case 2: $house_arenda = $house_arenda->orderBy('area')->get();break; 334 case 2: $house_arenda = $house_arenda->orderBy('area')->get();break;
274 } 335 }
275 } else { 336 } else {
276 $house_arenda = $house_arenda->orderBy('price')-> 337 $house_arenda = $house_arenda->orderBy('price')->
277 orderByDesc('created_at')-> 338 orderByDesc('created_at')->
278 orderByDesc('area')->get(); 339 orderByDesc('area')->get();
279 } 340 }
280 341
281 ////////раздел продажа////////////////////////////////////////////////////////////////// 342 ////////раздел продажа//////////////////////////////////////////////////////////////////
282 $house_prodaja = House::with('areas')-> 343 $house_prodaja = House::with('areas')->
283 where('format_house', '=', 'Продажа'); 344 where('format_house', '=', 'Продажа');
284 345
285 // условия поиска по объектам комплексов 346 // условия поиска по объектам комплексов
286 if (!empty($request->area)) { 347 if (!empty($request->area)) {
287 $house_prodaja = $house_prodaja->where('area_id', '=', $request->area); 348 $house_prodaja = $house_prodaja->where('area_id', '=', $request->area);
288 } 349 }
289 // условия поиска по типу недвижимости 350 // условия поиска по типу недвижимости
290 if (!empty($request->type_area)) { 351 if (!empty($request->type_area)) {
291 $house_prodaja = $house_prodaja->where('type_area_id', '=', $request->type_area); 352 $house_prodaja = $house_prodaja->where('type_area_id', '=', $request->type_area);
292 } 353 }
293 // условия поиска по формату недвижимости 354 // условия поиска по формату недвижимости
294 if (!empty($request->format_area)) { 355 if (!empty($request->format_area)) {
295 $house_prodaja = $house_prodaja->where('format_area_id', '=', $request->format_area); 356 $house_prodaja = $house_prodaja->where('format_area_id', '=', $request->format_area);
296 } 357 }
297 // условия поиска по площади - минимальная площадь 358 // условия поиска по площади - минимальная площадь
298 if (!empty($request->area_m2_min)) { 359 if (!empty($request->area_m2_min)) {
299 $house_prodaja = $house_prodaja->where('area', '>', $request->area_m2_min); 360 $house_prodaja = $house_prodaja->where('area', '>', $request->area_m2_min);
300 } 361 }
301 // условия поиска по площади - максимальная площадь 362 // условия поиска по площади - максимальная площадь
302 if (!empty($request->area_m2_max)) { 363 if (!empty($request->area_m2_max)) {
303 $house_prodaja = $house_prodaja->where('area', '<', $request->area_m2_max); 364 $house_prodaja = $house_prodaja->where('area', '<', $request->area_m2_max);
304 } 365 }
305 // условия поиска по цене - минимальная цена 366 // условия поиска по цене - минимальная цена
306 if (!empty($request->price_min)) { 367 if (!empty($request->price_min)) {
307 $house_prodaja = $house_prodaja->where('price', '>', $request->price_min); 368 $house_prodaja = $house_prodaja->where('price', '>', $request->price_min);
308 } 369 }
309 // условия поиска по цене - максимальная цена 370 // условия поиска по цене - максимальная цена
310 if (!empty($request->price_max)) { 371 if (!empty($request->price_max)) {
311 $house_prodaja = $house_prodaja->where('price', '<', $request->price_max); 372 $house_prodaja = $house_prodaja->where('price', '<', $request->price_max);
312 } 373 }
313 // условия поиска по адресу 374 // условия поиска по адресу
314 if (!empty($request->address)) { 375 if (!empty($request->address)) {
315 $house_prodaja = $house_prodaja->where('address', 'LIKE', "%".$request->address."%"); 376 $house_prodaja = $house_prodaja->where('address', 'LIKE', "%".$request->address."%");
316 } 377 }
317 378
318 if ($request->view == 'prodaja') { 379 if ($request->view == 'prodaja') {
319 switch ($request->sort_price) { 380 switch ($request->sort_price) {
320 case 1: $house_prodaja = $house_prodaja->orderBy('price');break; 381 case 1: $house_prodaja = $house_prodaja->orderBy('price');break;
321 case 2: $house_prodaja = $house_prodaja->orderByDesc('price');break; 382 case 2: $house_prodaja = $house_prodaja->orderByDesc('price');break;
322 } 383 }
323 switch ($request->sort_new) { 384 switch ($request->sort_new) {
324 case 1: $house_prodaja = $house_prodaja->orderByDesc('created_at');break; 385 case 1: $house_prodaja = $house_prodaja->orderByDesc('created_at');break;
325 case 2: $house_prodaja = $house_prodaja->orderBy('created_at');break; 386 case 2: $house_prodaja = $house_prodaja->orderBy('created_at');break;
326 } 387 }
327 switch ($request->sort_area) { 388 switch ($request->sort_area) {
328 case 1: $house_prodaja = $house_prodaja->orderByDesc('area')->get();break; 389 case 1: $house_prodaja = $house_prodaja->orderByDesc('area')->get();break;
329 case 2: $house_prodaja = $house_prodaja->orderBy('area')->get();break; 390 case 2: $house_prodaja = $house_prodaja->orderBy('area')->get();break;
330 } 391 }
331 } else { 392 } else {
332 $house_prodaja = $house_prodaja->orderBy('price')-> 393 $house_prodaja = $house_prodaja->orderBy('price')->
333 orderByDesc('created_at')-> 394 orderByDesc('created_at')->
334 orderByDesc('area')->get(); 395 orderByDesc('area')->get();
335 } 396 }
336 397
337 //////////////// Раздел бизнеса///////////////////////////////////////////////////////// 398 //////////////// Раздел бизнеса/////////////////////////////////////////////////////////
338 $house_bissnes = House::with('areas')-> 399 $house_bissnes = House::with('areas')->
339 where('format_house', '=', 'Бизнес'); 400 where('format_house', '=', 'Бизнес');
340 //orderByDesc('created_at')->get(); 401 //orderByDesc('created_at')->get();
341 402
342 // условия поиска по объектам комплексов 403 // условия поиска по объектам комплексов
343 if (!empty($request->area)) { 404 if (!empty($request->area)) {
344 $house_bissnes = $house_bissnes->where('area_id', '=', $request->area); 405 $house_bissnes = $house_bissnes->where('area_id', '=', $request->area);
345 } 406 }
346 // условия поиска по типу недвижимости 407 // условия поиска по типу недвижимости
347 if (!empty($request->type_area)) { 408 if (!empty($request->type_area)) {
348 $house_bissnes = $house_bissnes->where('type_area_id', '=', $request->type_area); 409 $house_bissnes = $house_bissnes->where('type_area_id', '=', $request->type_area);
349 } 410 }
350 // условия поиска по формату недвижимости 411 // условия поиска по формату недвижимости
351 if (!empty($request->format_area)) { 412 if (!empty($request->format_area)) {
352 $house_bissnes = $house_bissnes->where('format_area_id', '=', $request->format_area); 413 $house_bissnes = $house_bissnes->where('format_area_id', '=', $request->format_area);
353 } 414 }
354 // условия поиска по площади - минимальная площадь 415 // условия поиска по площади - минимальная площадь
355 if (!empty($request->area_m2_min)) { 416 if (!empty($request->area_m2_min)) {
356 $house_bissnes = $house_bissnes->where('area', '>', $request->area_m2_min); 417 $house_bissnes = $house_bissnes->where('area', '>', $request->area_m2_min);
357 } 418 }
358 // условия поиска по площади - максимальная площадь 419 // условия поиска по площади - максимальная площадь
359 if (!empty($request->area_m2_max)) { 420 if (!empty($request->area_m2_max)) {
360 $house_bissnes = $house_bissnes->where('area', '<', $request->area_m2_max); 421 $house_bissnes = $house_bissnes->where('area', '<', $request->area_m2_max);
361 } 422 }
362 // условия поиска по цене - минимальная цена 423 // условия поиска по цене - минимальная цена
363 if (!empty($request->price_min)) { 424 if (!empty($request->price_min)) {
364 $house_bissnes = $house_bissnes->where('price', '>', $request->price_min); 425 $house_bissnes = $house_bissnes->where('price', '>', $request->price_min);
365 } 426 }
366 // условия поиска по цене - максимальная цена 427 // условия поиска по цене - максимальная цена
367 if (!empty($request->price_max)) { 428 if (!empty($request->price_max)) {
368 $house_bissnes = $house_bissnes->where('price', '<', $request->price_max); 429 $house_bissnes = $house_bissnes->where('price', '<', $request->price_max);
369 } 430 }
370 // условия поиска по адресу 431 // условия поиска по адресу
371 if (!empty($request->address)) { 432 if (!empty($request->address)) {
372 $house_bissnes = $house_bissnes->where('address', 'LIKE', "%".$request->address."%"); 433 $house_bissnes = $house_bissnes->where('address', 'LIKE', "%".$request->address."%");
373 } 434 }
374 435
375 if ($request->view == 'bissnes') { 436 if ($request->view == 'bissnes') {
376 switch ($request->sort_price) { 437 switch ($request->sort_price) {
377 case 1: $house_bissnes = $house_bissnes->orderBy('price');break; 438 case 1: $house_bissnes = $house_bissnes->orderBy('price');break;
378 case 2: $house_bissnes = $house_bissnes->orderByDesc('price');break; 439 case 2: $house_bissnes = $house_bissnes->orderByDesc('price');break;
379 } 440 }
380 switch ($request->sort_new) { 441 switch ($request->sort_new) {
381 case 1: $house_bissnes = $house_bissnes->orderByDesc('created_at');break; 442 case 1: $house_bissnes = $house_bissnes->orderByDesc('created_at');break;
382 case 2: $house_bissnes = $house_bissnes->orderBy('created_at');break; 443 case 2: $house_bissnes = $house_bissnes->orderBy('created_at');break;
383 } 444 }
384 switch ($request->sort_area) { 445 switch ($request->sort_area) {
385 case 1: $house_bissnes = $house_bissnes->orderByDesc('area')->get();break; 446 case 1: $house_bissnes = $house_bissnes->orderByDesc('area')->get();break;
386 case 2: $house_bissnes = $house_bissnes->orderBy('area')->get();break; 447 case 2: $house_bissnes = $house_bissnes->orderBy('area')->get();break;
387 } 448 }
388 } else { 449 } else {
389 $house_bissnes = $house_bissnes->orderBy('price')-> 450 $house_bissnes = $house_bissnes->orderBy('price')->
390 orderByDesc('created_at')-> 451 orderByDesc('created_at')->
391 orderByDesc('area')->get(); 452 orderByDesc('area')->get();
392 } 453 }
393 454
394 //////////раздел арендованные////////////////////////////////////////////////////////// 455 //////////раздел арендованные//////////////////////////////////////////////////////////
395 $house_arendovannie = House::with('areas')-> 456 $house_arendovannie = House::with('areas')->
396 where('format_house', '=', 'Арендованные'); 457 where('format_house', '=', 'Арендованные');
397 //orderByDesc('created_at')->get(); 458 //orderByDesc('created_at')->get();
398 459
399 // условия поиска по объектам комплексов 460 // условия поиска по объектам комплексов
400 if (!empty($request->area)) { 461 if (!empty($request->area)) {
401 $house_arendovannie = $house_arendovannie->where('area_id', '=', $request->area); 462 $house_arendovannie = $house_arendovannie->where('area_id', '=', $request->area);
402 } 463 }
403 // условия поиска по типу недвижимости 464 // условия поиска по типу недвижимости
404 if (!empty($request->type_area)) { 465 if (!empty($request->type_area)) {
405 $house_arendovannie = $house_arendovannie->where('type_area_id', '=', $request->type_area); 466 $house_arendovannie = $house_arendovannie->where('type_area_id', '=', $request->type_area);
406 } 467 }
407 // условия поиска по формату недвижимости 468 // условия поиска по формату недвижимости
408 if (!empty($request->format_area)) { 469 if (!empty($request->format_area)) {
409 $house_arendovannie = $house_arendovannie->where('format_area_id', '=', $request->format_area); 470 $house_arendovannie = $house_arendovannie->where('format_area_id', '=', $request->format_area);
410 } 471 }
411 // условия поиска по площади - минимальная площадь 472 // условия поиска по площади - минимальная площадь
412 if (!empty($request->area_m2_min)) { 473 if (!empty($request->area_m2_min)) {
413 $house_arendovannie = $house_arendovannie->where('area', '>', $request->area_m2_min); 474 $house_arendovannie = $house_arendovannie->where('area', '>', $request->area_m2_min);
414 } 475 }
415 // условия поиска по площади - максимальная площадь 476 // условия поиска по площади - максимальная площадь
416 if (!empty($request->area_m2_max)) { 477 if (!empty($request->area_m2_max)) {
417 $house_arendovannie = $house_arendovannie->where('area', '<', $request->area_m2_max); 478 $house_arendovannie = $house_arendovannie->where('area', '<', $request->area_m2_max);
418 } 479 }
419 // условия поиска по цене - минимальная цена 480 // условия поиска по цене - минимальная цена
420 if (!empty($request->price_min)) { 481 if (!empty($request->price_min)) {
421 $house_arendovannie = $house_arendovannie->where('price', '>', $request->price_min); 482 $house_arendovannie = $house_arendovannie->where('price', '>', $request->price_min);
422 } 483 }
423 // условия поиска по цене - максимальная цена 484 // условия поиска по цене - максимальная цена
424 if (!empty($request->price_max)) { 485 if (!empty($request->price_max)) {
425 $house_arendovannie = $house_arendovannie->where('price', '<', $request->price_max); 486 $house_arendovannie = $house_arendovannie->where('price', '<', $request->price_max);
426 } 487 }
427 // условия поиска по адресу 488 // условия поиска по адресу
428 if (!empty($request->address)) { 489 if (!empty($request->address)) {
429 $house_arendovannie = $house_arendovannie->where('address', 'LIKE', "%".$request->address."%"); 490 $house_arendovannie = $house_arendovannie->where('address', 'LIKE', "%".$request->address."%");
430 } 491 }
431 492
432 if ($request->view == 'arendovannie') { 493 if ($request->view == 'arendovannie') {
433 switch ($request->sort_price) { 494 switch ($request->sort_price) {
434 case 1: $house_arendovannie = $house_arendovannie->orderBy('price');break; 495 case 1: $house_arendovannie = $house_arendovannie->orderBy('price');break;
435 case 2: $house_arendovannie = $house_arendovannie->orderByDesc('price');break; 496 case 2: $house_arendovannie = $house_arendovannie->orderByDesc('price');break;
436 } 497 }
437 switch ($request->sort_new) { 498 switch ($request->sort_new) {
438 case 1: $house_arendovannie = $house_arendovannie->orderByDesc('created_at');break; 499 case 1: $house_arendovannie = $house_arendovannie->orderByDesc('created_at');break;
439 case 2: $house_arendovannie = $house_arendovannie->orderBy('created_at');break; 500 case 2: $house_arendovannie = $house_arendovannie->orderBy('created_at');break;
440 } 501 }
441 switch ($request->sort_area) { 502 switch ($request->sort_area) {
442 case 1: $house_arendovannie = $house_arendovannie->orderByDesc('area')->get();break; 503 case 1: $house_arendovannie = $house_arendovannie->orderByDesc('area')->get();break;
443 case 2: $house_arendovannie = $house_arendovannie->orderBy('area')->get();break; 504 case 2: $house_arendovannie = $house_arendovannie->orderBy('area')->get();break;
444 } 505 }
445 } else { 506 } else {
446 $house_arendovannie = $house_arendovannie->orderBy('price')-> 507 $house_arendovannie = $house_arendovannie->orderBy('price')->
447 orderByDesc('created_at')-> 508 orderByDesc('created_at')->
448 orderByDesc('area')->get(); 509 orderByDesc('area')->get();
449 } 510 }
450 511
451 if ($request->ajax()) { 512 if ($request->ajax()) {
452 switch($request->view) { 513 switch($request->view) {
453 case 'arenda': return view('ajax.complex.arenda', compact('house_arenda')); break; 514 case 'arenda': return view('ajax.complex.arenda', compact('house_arenda')); break;
454 case 'prodaja': return view('ajax.complex.prodaja', compact('house_prodaja'));break; 515 case 'prodaja': return view('ajax.complex.prodaja', compact('house_prodaja'));break;
455 case 'bissnes': return view('ajax.complex.bissnes', compact('house_bissnes')); break; 516 case 'bissnes': return view('ajax.complex.bissnes', compact('house_bissnes')); break;
456 case 'arendovannie': return view('ajax.complex.arendovannie', compact('house_arendovannie')); break; 517 case 'arendovannie': return view('ajax.complex.arendovannie', compact('house_arendovannie')); break;
457 } 518 }
458 } 519 }
459 if (session('message') == 'Искать') { 520 if (session('message') == 'Искать') {
460 session()->flash('message', 'Сброс'); 521 session()->flash('message', 'Сброс');
461 } else { 522 } else {
462 session()->flash('message', 'Искать'); 523 session()->flash('message', 'Искать');
463 } 524 }
464 525
465 if (empty($request)) { 526 if (empty($request)) {
466 session()->flash('message', 'Искать'); 527 session()->flash('message', 'Искать');
467 } 528 }
468 529
469 return view('catalog', compact( 530 return view('catalog', compact(
470 'house_arenda', 531 'house_arenda',
471 'house_prodaja', 532 'house_prodaja',
472 'house_bissnes', 533 'house_bissnes',
473 'house_arendovannie' 534 'house_arendovannie'
474 )); 535 ));
475 536
476 537
477 } 538 }
478 539
479 /* 540 /*
480 * Новости 541 * Новости
481 */ 542 */
482 public function News() { 543 public function News() {
483 //$news = News::orderByDesc('created_at')->limit(1)->paginate(); 544 //$news = News::orderByDesc('created_at')->limit(1)->paginate();
484 $news_ = News::query()->orderByDesc('created_at')->paginate(4); 545 $news_ = News::query()->orderByDesc('created_at')->paginate(4);
485 return view('news', compact('news_')); 546 return view('news', compact('news_'));
486 } 547 }
487 548
488 /* 549 /*
489 * Контакты 550 * Контакты
490 */ 551 */
491 public function Contact() { 552 public function Contact() {
492 return view('contact'); 553 return view('contact');
493 } 554 }
494 555
495 /* 556 /*
496 * Карта объектов 557 * Карта объектов
497 */ 558 */
498 public function MapsObj() { 559 public function MapsObj() {
499 return view('mapsobj'); 560 return view('mapsobj');
500 } 561 }
501 562
502 /* 563 /*
503 * Посмотр конктретного предложение офиса 564 * Посмотр конктретного предложение офиса
504 */ 565 */
505 public function Offer(House $house) { 566 public function Offer(House $house) {
506 $houses = House::with('areas'); 567 $houses = House::with('areas');
507 $houses = $houses->where('type_area_id', '=', $house->typearea->id); 568 $houses = $houses->where('type_area_id', '=', $house->typearea->id);
508 $houses = $houses->where('format_house', '=', $house->format_house); 569 $houses = $houses->where('format_house', '=', $house->format_house);
509 $houses = $houses->orderByDesc('created_at')->limit(8)->get(); 570 $houses = $houses->orderByDesc('created_at')->limit(8)->get();
510 571
511 return view('house.post', compact('house', 'houses')); 572 return view('house.post', compact('house', 'houses'));
512 } 573 }
513 574
514 /* 575 /*
515 * Просмотр детально конкретной новости 576 * Просмотр детально конкретной новости
516 */ 577 */
517 public function DetailNew(News $news) { 578 public function DetailNew(News $news) {
518 $news_list = News::query()->orderByDesc('created_at')->limit(8)->get(); 579 $news_list = News::query()->orderByDesc('created_at')->limit(8)->get();
519 return view('new.post', compact('news', 'news_list')); 580 return view('new.post', compact('news', 'news_list'));
520 } 581 }
521 } 582 }
522 583
app/Http/Controllers/RegisterController.php
1 <?php 1 <?php
2 2
3 namespace App\Http\Controllers; 3 namespace App\Http\Controllers;
4 4
5 use App\Models\User; 5 use App\Models\User;
6 use Illuminate\Http\Request; 6 use Illuminate\Http\Request;
7 use Illuminate\Support\Facades\Hash; 7 use Illuminate\Support\Facades\Hash;
8 8
9 // Контроллер регистрации пользователя 9 // Контроллер регистрации пользователя
10 class RegisterController extends Controller 10 class RegisterController extends Controller
11 { 11 {
12 public function __construct() { 12 public function __construct() {
13 //$this->middleware('guest'); 13 $this->middleware('guest');
14 } 14 }
15 15
16 // Форма регистрации 16 // Форма регистрации
17 public function register() { 17 public function register() {
18 return view('auth.register'); 18 return view('auth.register');
19 } 19 }
20 20
21 // Создание пользователя 21 // Создание пользователя
22 public function create(Request $request) { 22 public function create(Request $request) {
23 $request->validate([ 23 $request->validate([
24 'name' => 'required|string|max:255', 24 'name' => 'required|string|max:255',
25 'email' => 'required|string|email|max:255|unique:users', 25 'email' => 'required|string|email|max:255|unique:users',
26 'password' => 'required|string|min:8|confirmed', 26 'password' => 'required|string|min:8|confirmed',
27 ]); 27 ]);
28 28
29 User::create([ 29 User::create([
30 'name' => $request->name, 30 'name' => $request->name,
31 'email' => $request->email, 31 'email' => $request->email,
32 'password' => Hash::make($request->password), 32 'password' => Hash::make($request->password),
33 ]); 33 ]);
34 34
35 return redirect() 35 return redirect()
36 ->route('auth.login') 36 ->route('auth.login')
37 ->with('success', 'Вы успешно зарегистрировались'); 37 ->with('success', 'Вы успешно зарегистрировались');
38 } 38 }
39 } 39 }
40 40
app/Http/Middleware/Authenticate.php
1 <?php 1 <?php
2 2
3 namespace App\Http\Middleware; 3 namespace App\Http\Middleware;
4 4
5 use Illuminate\Auth\Middleware\Authenticate as Middleware; 5 use Illuminate\Auth\Middleware\Authenticate as Middleware;
6 6
7 class Authenticate extends Middleware 7 class Authenticate extends Middleware
8 { 8 {
9 /** 9 /**
10 * Get the path the user should be redirected to when they are not authenticated. 10 * Get the path the user should be redirected to when they are not authenticated.
11 * 11 *
12 * @param \Illuminate\Http\Request $request 12 * @param \Illuminate\Http\Request $request
13 * @return string|null 13 * @return string|null
14 */ 14 */
15 protected function redirectTo($request) 15 protected function redirectTo($request)
16 { 16 {
17 if (! $request->expectsJson()) { 17 if (! $request->expectsJson()) {
18 return route('login'); 18 return route('auth.login');
19 } 19 }
20 } 20 }
21 } 21 }
22 22
app/Http/Middleware/RedirectIfAuthenticated.php
1 <?php 1 <?php
2 2
3 namespace App\Http\Middleware; 3 namespace App\Http\Middleware;
4 4
5 use App\Providers\RouteServiceProvider; 5 use App\Providers\RouteServiceProvider;
6 use Closure; 6 use Closure;
7 use Illuminate\Http\Request; 7 use Illuminate\Http\Request;
8 use Illuminate\Support\Facades\Auth; 8 use Illuminate\Support\Facades\Auth;
9 9
10 class RedirectIfAuthenticated 10 class RedirectIfAuthenticated
11 { 11 {
12 /** 12 /**
13 * Handle an incoming request. 13 * Handle an incoming request.
14 * 14 *
15 * @param \Illuminate\Http\Request $request 15 * @param \Illuminate\Http\Request $request
16 * @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next 16 * @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
17 * @param string|null ...$guards 17 * @param string|null ...$guards
18 * @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse 18 * @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
19 */ 19 */
20 public function handle(Request $request, Closure $next, ...$guards) 20 public function handle(Request $request, Closure $next, ...$guards)
21 { 21 {
22 $guards = empty($guards) ? [null] : $guards; 22 $guards = empty($guards) ? [null] : $guards;
23 23
24 foreach ($guards as $guard) { 24 foreach ($guards as $guard) {
25 if (Auth::guard($guard)->check()) { 25 if (Auth::guard($guard)->check()) {
26 return redirect(RouteServiceProvider::HOME); 26 //return redirect(RouteServiceProvider::HOME);
27 return redirect()->route('user.index');
27 } 28 }
28 } 29 }
29 30
30 return $next($request); 31 return $next($request);
31 } 32 }
32 } 33 }
33 34
database/migrations/2023_03_01_073202_create_houses_table.php
1 <?php 1 <?php
2 2
3 use Illuminate\Database\Migrations\Migration; 3 use Illuminate\Database\Migrations\Migration;
4 use Illuminate\Database\Schema\Blueprint; 4 use Illuminate\Database\Schema\Blueprint;
5 use Illuminate\Support\Facades\Schema; 5 use Illuminate\Support\Facades\Schema;
6 6
7 return new class extends Migration 7 return new class extends Migration
8 { 8 {
9 /** 9 /**
10 * Run the migrations. 10 * Run the migrations.
11 * 11 *
12 * @return void 12 * @return void
13 */ 13 */
14 public function up() 14 public function up()
15 { 15 {
16 Schema::create('houses', function (Blueprint $table) { 16 Schema::create('houses', function (Blueprint $table) {
17 $table->id(); 17 $table->id();
18 $table->integer('area_id'); 18 $table->integer('area_id');
19 $table->integer('type_area_id'); 19 $table->integer('type_area_id');
20 $table->integer('format_area_id'); 20 $table->integer('format_area_id');
21 $table->string('title', 255)->default(''); 21 $table->string('title', 255)->default('');
22 $table->string('slug', 255)->default(''); 22 $table->string('slug', 255)->default('');
23 $table->string('metro', 255)->default(''); 23 $table->string('metro', 255)->default('');
24 $table->string('color_metro', 255)->default(''); 24 $table->string('color_metro', 255)->default('');
25 $table->string('foto_main', 255)->default(''); 25 $table->string('foto_main', 255)->default('');
26 $table->string('address', 255)->default(''); 26 $table->string('address', 255)->default('');
27 $table->string('okrug', 255)->default(''); 27 $table->string('okrug', 255)->default('');
28 $table->string('articul_area', 255)->default(''); 28 $table->string('articul_area', 255)->default('');
29 $table->integer('area')->default(0); 29 $table->integer('area')->default(0);
30 $table->string('format_house', 50)->default('Аренда'); 30 $table->string('format_house', 50)->default('Аренда');
31 $table->integer('floor')->default(1); 31 $table->integer('floor')->default(1);
32 $table->integer('floor_bild')->default(1); 32 $table->integer('floor_bild')->default(1);
33 $table->string('renter')->default(''); 33 $table->string('renter')->default('');
34 $table->boolean('unloading_area')->default('1'); 34 $table->boolean('unloading_area')->default('1');
35 $table->string('electric_power')->default(''); 35 $table->string('electric_power')->default('');
36 $table->boolean('travel_card')->default('1'); 36 $table->boolean('travel_card')->default('1');
37 $table->boolean('passing_place')->default('1'); 37 $table->boolean('passing_place')->default('1');
38 $table->boolean('separate_input')->default('1'); 38 $table->boolean('separate_input')->default('1');
39 $table->boolean('shop_windows')->default('1'); 39 $table->boolean('shop_windows')->default('1');
40 $table->boolean('place_advertising')->default('1'); 40 $table->boolean('place_advertising')->default('1');
41 $table->integer('windows')->default('1'); 41 $table->integer('windows')->default('1');
42 $table->boolean('hood')->default('1'); 42 $table->boolean('hood')->default('1');
43 $table->boolean('central_heating')->default('1'); 43 $table->boolean('central_heating')->default('1');
44 $table->string('opening_hours')->default(''); 44 $table->string('opening_hours')->default('');
45 $table->boolean('finishing')->default('1'); 45 $table->boolean('finishing')->default('1');
46 $table->integer('parking')->default(15); 46 $table->integer('parking')->default(15);
47 $table->integer('price')->default(0); 47 $table->integer('price')->default(0);
48 $table->integer('price_m2')->default(0); 48 $table->integer('price_m2')->default(0);
49 $table->integer('rent_in_year')->default(0); 49 $table->integer('rent_in_year')->default(0);
50 $table->integer('rent_in_month')->default(0); 50 $table->integer('rent_in_month')->default(0);
51 $table->string('scheme_deal')->default('Прямая аренда'); 51 $table->string('scheme_deal', 255)->default('Прямая аренда');
52 $table->string('present', 255)->default(''); 52 $table->string('present', 255)->default('');
53 $table->string('object_plan', 255)->default(''); 53 $table->string('object_plan', 255)->default('');
54 $table->string('floor_plan', 255)->default(''); 54 $table->string('floor_plan', 255)->default('');
55 $table->string('description_metro', 255); 55 $table->string('description_metro', 255);
56 $table->text('description_house')->nullable(true); 56 $table->text('description_house')->nullable(true);
57 $table->string('map_coord', 255)->default(''); 57 $table->string('map_coord', 255)->default('');
58 $table->boolean('best')->default('0'); 58 $table->boolean('best')->default('0');
59 $table->string('description_2')->default(''); 59 $table->string('description_2')->default('');
60 $table->string('sos_obj')->default('Рабочая'); 60 $table->string('sos_obj')->default('Рабочая');
61 $table->string('type_plan')->default('Открытая'); 61 $table->string('type_plan')->default('Открытая');
62 62
63 $table->timestamps(); 63 $table->timestamps();
64 }); 64 });
65 } 65 }
66 66
67 /** 67 /**
68 * Reverse the migrations. 68 * Reverse the migrations.
69 * 69 *
70 * @return void 70 * @return void
71 */ 71 */
72 public function down() 72 public function down()
73 { 73 {
74 Schema::dropIfExists('houses'); 74 Schema::dropIfExists('houses');
75 } 75 }
76 }; 76 };
77 77
resources/views/admin/index.blade.php
1 @extends('layout.site', ['title' => 'Личный кабинет']) 1 @extends('layout.site', ['title' => 'Личный кабинет'])
2 2
3 @section('content') 3 @section('content')
4 <h1>Личный кабинет</h1> 4 <section class="favorites">
5 <p>Добрый день {{ auth()->user()->name }}!</p> 5 <div class="favorites-top">
6 <p>Это личный кабинет пользователя сайта.</p> 6 <div class="container">
7 <div class="breadcrumbs">
8 <ul class="breadcrumbs__list">
9 <li class="breadcrumbs__item"><a class="breadcrumbs__link" href="{{ route('index') }}">Главная</a></li>
10 <li class="breadcrumbs__item"><span class="breadcrumbs__link">Админка </span></li>
11 </ul>
12 </div>
13 <h1 class="favorites__title title-main">Личный кабинет</h1>
14 <p class="favorites__descr">
15 Добрый день {{ auth()->user()->name }}!<br>
16 Это личный кабинет пользователя сайта.<br>
17 <a class="btn btn-success" href="{{ route('auth.logout') }}">Выйти из системы</a><br>
18 </p>
19 </div>
20 </div>
21 <div class="favorites-cnt">
22 <div class="container">
23 <div class="favorites__items">
24 <div class="favorites-item">
25 <div class="favorites-item__img"><img src="images/favorites/favorites-item-img-1.svg" alt=""></div>
26 <p class="favorites-item__descr"><a href="#">Найдите</a> идеальную планировку на сайте Renttorg</p>
27 </div>
28 <div class="favorites-item">
29 <div class="favorites-item__img"><img src="images/favorites/favorites-item-img-2.svg" alt=""></div>
30 <p class="favorites-item__descr">Нажмите на <img src="images/favorites-icon-mini.svg" alt=""> для добавления недвижемости в избранное</p>
31 </div>
32 <div class="favorites-item">
33 <div class="favorites-item__img"><img src="images/favorites/favorites-item-img-3.svg" alt=""></div>
34 <p class="favorites-item__descr">Перейдите в избранное или сравнение для выбора планировки</p>
35 </div>
36 </div>
37 </div>
38 </div>
39 </section>
7 @endsection 40 @endsection
41
8 42
resources/views/ajax/complex/category.blade.php
File was created 1 <div class="category__grid">
2 @if ($houses->count())
3 @foreach ($houses as $house1)
4 @include('catalogs.house_mini', ['house' => $house1])
5 @endforeach
6
7 @else
8 <h3>Здесь пока что нет предложений</h3>
9 @endif
10 </div>
11 <div class="pagination">
12 <?//=$houses->appends($_GET)->links('catalogs.paginate');?>
13 </div>
14
15
resources/views/category_catalog.blade.php
1 @extends('layout.site', ['title' => $title]) 1 @extends('layout.site', ['title' => $title])
2 2
3 @section('filter') 3 @section('filter')
4 @include('part.filter.category', ['title' => $title]) 4 @include('part.filter.category', ['title' => $title])
5 @endsection 5 @endsection
6 6
7 @section('custom_js')
8 <script>
9 $(window).load(function() {
10 var url_str = "<?=url()->full();?>";
11 var url = new URL(url_str);
12 var searchParams = new URLSearchParams(url.search.substring(1));
13
14 var area = searchParams.get("area"),
15 type_area = searchParams.get("type_area"),
16 format_area= searchParams.get("format_area"),
17 address= searchParams.get("address");
18
19 var area_name = $('#area_name');
20 var type_area_name = $('#type_area_name');
21 var format_area_name = $('#format_area_name');
22 var address_name = $('#address');
23
24 if ((area !== "") || (type_area !== "") || (format_area !== "") || (address !== ""))
25 {
26 $.ajax({
27 type: "GET",
28 url: "{{ route('catalog_ajax_filter') }}",
29 data: "area=" + area + "&type_area=" + type_area + "&format_area=" + format_area + "&address=" + address + "",
30 success: function (data) {
31 console.log('Фильтры данных были переданы ');
32 data = JSON.parse(data);
33 console.log(data);
34
35 if (area !== "") {
36 area_name.html(data[0]);
37 }
38 if (type_area !== "") {
39 type_area_name.html(data[1]);
40 }
41 if (format_area !== "") {
42 format_area_name.html(data[2]);
43 }
44 if (address !== "") {
45 address_name.html(data[3]);
46 }
47
48 },
49 headers: {
50 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
51 },
52 error: function (data) {
53 console.log('Error: ' + data);
54 }
55 });
56 }
57 });
58
59 $(document).on('click', '.js_sort_group_item', function() {
60 var val = $(this).data('val');
61 var sort_price_val = '';
62 var sort_area_val = '';
63 var sort_new_val = '';
64
65 $('.sort-price').each(function() {
66 var this_ = $(this);
67 var v = $(this).data('val');
68 if (this_.hasClass('active'))
69 sort_price_val = v;
70 });
71
72 $('.sort-new').each(function() {
73 var v = $(this).data('val');
74 var this_ = $(this);
75 if (this_.hasClass('active'))
76 sort_new_val = v;
77 });
78
79 $('.sort-area').each(function() {
80 var v = $(this).data('val');
81 var this_ = $(this);
82 if (this_.hasClass('active'))
83 sort_area_val = v;
84
85 });
86
87 console.log('-------------------');
88 $.ajax({
89 type: "GET",
90 url: "{{ route('category', ['cat'=>$cat]) }}",
91 data: "sort_price="+sort_price_val+"&sort_new="+sort_new_val+"&sort_area="+sort_area_val+""+
92 "&area=<?if (isset($_GET['area'])) echo $_GET['area'];?>&type_area=<?if (isset($_GET['type_area'])) echo $_GET['type_area'];?>&format_area=<? if (isset($_GET['format_area'])) echo $_GET['format_area'];?>"+
93 "&area_m2_min=<? if (isset($_GET['area_m2_min'])) echo $_GET['area_m2_min'];?>&area_m2_max=<? if (isset($_GET['area_m2_max'])) echo $_GET['area_m2_max'];?>"+
94 "&price_min=<? if (isset($_GET['price_min'])) echo $_GET['price_min'];?>&price_max=<? if (isset($_GET['price_max'])) echo $_GET['price_max'];?>&address=<? if (isset($_GET['address'])) echo $_GET['address'];?>",
95 success: function(data) {
96 console.log('Успешно обновлены данные таблиц '+data);
97 $('#block_ajax').html(data);
98 },
99 headers: {
100 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
101 },
102 error: function(data) {
103 console.log('Error: '+ data);
104 }
105 });
106 }
107 );
108 </script>
109 @endsection
110
7 @section('content') 111 @section('content')
8 <section class="category"> 112 <section class="category">
9 <div class="container"> 113 <div class="container">
10 <div class="category__top top-catalog"> 114 <div class="category__top top-catalog">
11 <div class="top-catalog__inner"> 115 <div class="top-catalog__inner">
12 <h2 class="top-catalog__title title">Аренда торговых помещений</h2> 116 <h2 class="top-catalog__title title">{{ $title }}</h2>
13 <div class="top-catalog__result">Найдено объектов по Вашему запросу: <span>356</span></div> 117 <div class="top-catalog__result">Найдено объектов по Вашему запросу: <span>{{ $houses->count() }}</span></div>
14 </div> 118 </div>
15 <form class="top-catalog__sorts"> 119 <form class="top-catalog__sorts">
16 <div class="top-catalog__sort-group sort-group js_sort_group"> 120 <div class="top-catalog__sort-group sort-group js_sort_group">
17 <input class="js_sort_group_input" type="hidden"> 121 <input class="js_sort_group_input" type="hidden">
18 <div class="sort-group__current js_sort_group_current">Сначала дешевле</div> 122 <div class="sort-group__current js_sort_group_current">Сначала дешевле</div>
19 <ul class="sort-group__list js_sort_group_list"> 123 <ul class="sort-group__list js_sort_group_list">
20 <li class="sort-price sort-group__item js_sort_group_item active" data-val="1">Сначала дешевле</li> 124 <li class="sort-price sort-group__item js_sort_group_item active" data-val="1">Сначала дешевле</li>
21 <li class="sort-price sort-group__item js_sort_group_item" data-val="2">Сначала дороже</li> 125 <li class="sort-price sort-group__item js_sort_group_item" data-val="2">Сначала дороже</li>
22 </ul> 126 </ul>
23 </div> 127 </div>
24 <div class="top-catalog__sort-group sort-group js_sort_group"> 128 <div class="top-catalog__sort-group sort-group js_sort_group">
25 <input class="js_sort_group_input" type="hidden"> 129 <input class="js_sort_group_input" type="hidden">
26 <div class="sort-group__current js_sort_group_current">Сначала новые</div> 130 <div class="sort-group__current js_sort_group_current">Сначала новые</div>
27 <ul class="sort-group__list js_sort_group_list"> 131 <ul class="sort-group__list js_sort_group_list">
28 <li class="sort-new sort-group__item js_sort_group_item active" data-val="1">Сначала новые</li> 132 <li class="sort-new sort-group__item js_sort_group_item active" data-val="1">Сначала новые</li>
29 <li class="sort-new sort-group__item js_sort_group_item" data-val="2">Сначала старые</li> 133 <li class="sort-new sort-group__item js_sort_group_item" data-val="2">Сначала старые</li>
30 </ul> 134 </ul>
31 </div> 135 </div>
32 <div class="top-catalog__sort-group sort-group sort-group--wide js_sort_group"> 136 <div class="top-catalog__sort-group sort-group sort-group--wide js_sort_group">
33 <input class="js_sort_group_input" type="hidden"> 137 <input class="js_sort_group_input" type="hidden">
34 <div class="sort-group__current js_sort_group_current">Сначала с большей площадью</div> 138 <div class="sort-group__current js_sort_group_current">Сначала с большей площадью</div>
35 <ul class="sort-group__list js_sort_group_list"> 139 <ul class="sort-group__list js_sort_group_list">
36 <li class="sort-area sort-group__item js_sort_group_item active" data-val="1">Сначала с большей площадью</li> 140 <li class="sort-area sort-group__item js_sort_group_item active" data-val="1">Сначала с большей площадью</li>
37 <li class="sort-area sort-group__item js_sort_group_item" data-val="2">Сначала с меньшей площадью</li> 141 <li class="sort-area sort-group__item js_sort_group_item" data-val="2">Сначала с меньшей площадью</li>
38 </ul> 142 </ul>
39 </div> 143 </div>
40 </form> 144 </form>
41 </div> 145 </div>
146 <div id="block_ajax">
42 <div class="category__grid"> 147 <div class="category__grid">
43 @if ($houses->count()) 148 @if ($houses->count())
44 @foreach ($houses as $house1) 149 @foreach ($houses as $house1)
45 @include('catalogs.house_mini', ['house' => $house1]) 150 @include('catalogs.house_mini', ['house' => $house1])
46 @endforeach 151 @endforeach
47 @else 152 @else
48 <h3>Здесь пока что нет предложений</h3> 153 <h3>Здесь пока что нет предложений</h3>
49 @endif 154 @endif
50 <!--<div class="card">
51 <div class="card__top"><img src="images/card/card-img-1.jpg" alt="Фото недвижимости" loading="lazy">
52 <h3 class="card__title">Салон красоты</h3>
53 <div class="card__labels"><span class="card__label card__label-favorites js_card_favorites">
54 <svg width="18" height="18">
55 <use xlink:href="images/sprite.svg#card-favorites-empty"></use>
56 </svg>
57 <svg width="18" height="18">
58 <use xlink:href="images/sprite.svg#card-favorites"></use>
59 </svg></span><a class="card__label card__label-messenger" href="#">
60 <svg width="25" height="25">
61 <use xlink:href="images/sprite.svg#card-messenger"></use>
62 </svg></a></div>
63 </div>
64 <div class="card__cnt">
65 <div class="card__info">
66 <address class="card__line card__line-complex">ЖК “Новинки 1”</address>
67 <address class="card__line">Фрунзенская (10 мин., пешком)<span style="background-color: #FFC955;"></span></address>
68 <address class="card__line">ул. Ак. Королева, д. 13, стр. 1, этаж 7, пом. 1, к. 69</address>
69 <div class="card__line">Площадь: <b>556 м2</b></div>
70 <div class="card__line">Цена за м<sup>2</sup>: <b>550 256 ₽</b></div>
71 </div>
72 <div class="card__price"><span>1 000 000 ₽</span>
73 </div><a class="card__btn btn btn--bordered" href="#">Подробнее</a>
74 </div>
75 </div>
76 <div class="card">
77 <div class="card__top"><img src="images/card/card-img-2.jpg" alt="Фото недвижимости" loading="lazy">
78 <h3 class="card__title">Барбер-шоп</h3>
79 <div class="card__labels"><span class="card__label card__label-favorites js_card_favorites">
80 <svg width="18" height="18">
81 <use xlink:href="images/sprite.svg#card-favorites-empty"></use>
82 </svg>
83 <svg width="18" height="18">
84 <use xlink:href="images/sprite.svg#card-favorites"></use>
85 </svg></span><a class="card__label card__label-messenger" href="#">
86 <svg width="25" height="25">
87 <use xlink:href="images/sprite.svg#card-messenger"></use>
88 </svg></a></div>
89 </div>
90 <div class="card__cnt">
91 <div class="card__info">
92 <address class="card__line card__line-complex">ЖК “Новоарбатский”</address>
93 <address class="card__line">Арбатская (8 мин., пешком)<span style="background-color: #0000A0;"></span></address>
94 <address class="card__line">г. Москва, ул. Дербеневская, д. 1, стр. 6, п. 4, эт. 2, к. 3.1.</address>
95 <div class="card__line">Площадь: <b>6 556 м2</b></div>
96 <div class="card__line">Цена за м<sup>2</sup>: <b>5 225 256 ₽</b></div>
97 </div>
98 <div class="card__price"><span>15 520 900 ₽</span><span>в месяц</span>
99 </div><a class="card__btn btn btn--bordered" href="#">Подробнее об аренде</a>
100 </div>
101 </div>
102 <div class="card">
103 <div class="card__top"><img src="images/card/card-img-3.jpg" alt="Фото недвижимости" loading="lazy">
104 <h3 class="card__title">Аптека</h3>
105 <div class="card__labels"><span class="card__label card__label-favorites js_card_favorites">
106 <svg width="18" height="18">
107 <use xlink:href="images/sprite.svg#card-favorites-empty"></use>
108 </svg>
109 <svg width="18" height="18">
110 <use xlink:href="images/sprite.svg#card-favorites"></use>
111 </svg></span><a class="card__label card__label-messenger" href="#">
112 <svg width="25" height="25">
113 <use xlink:href="images/sprite.svg#card-messenger"></use>
114 </svg></a></div>
115 </div>
116 <div class="card__cnt">
117 <div class="card__info">
118 <address class="card__line card__line-complex">ЖК “Садовые кварталы”</address>
119 <address class="card__line">Коломенская (2 мин., пешком)<span style="background-color: #029B55;"></span></address>
120 <address class="card__line">ул. Ак. Королева, д. 13, стр. 1, этаж 7, пом. 1, к. 69</address>
121 <div class="card__line">Площадь: <b>8 626 м2</b></div>
122 <div class="card__line">Цена за м<sup>2</sup>: <b>550 256 ₽</b></div>
123 </div>
124 <div class="card__price"><span>5 280 000 ₽</span>
125 </div><a class="card__btn btn btn--bordered" href="#">Подробнее о продаже</a>
126 </div>
127 </div>
128 <div class="card">
129 <div class="card__top"><img src="images/card/card-img-4.jpg" alt="Фото недвижимости" loading="lazy">
130 <h3 class="card__title">Витрина</h3>
131 <div class="card__labels"><span class="card__label card__label-favorites js_card_favorites">
132 <svg width="18" height="18">
133 <use xlink:href="images/sprite.svg#card-favorites-empty"></use>
134 </svg>
135 <svg width="18" height="18">
136 <use xlink:href="images/sprite.svg#card-favorites"></use>
137 </svg></span><a class="card__label card__label-messenger" href="#">
138 <svg width="25" height="25">
139 <use xlink:href="images/sprite.svg#card-messenger"></use>
140 </svg></a></div>
141 </div>
142 <div class="card__cnt">
143 <div class="card__info">
144 <address class="card__line card__line-complex">ЖК “Нахимовский проспект, 46”</address>
145 <address class="card__line">Парк Победы (5 мин., пешком)<span style="background-color: #222964;"></span></address>
146 <address class="card__line">г. Москва, ул. Дербеневская, д. 1, стр. 6, п. 4, эт. 2, к. 3.1.</address>
147 <div class="card__line">Площадь: <b>6 856 м2</b></div>
148 <div class="card__line">Цена за м<sup>2</sup>: <b>25 256 ₽</b></div>
149 </div>
150 <div class="card__price"><span>2 625 520 ₽</span><span>в месяц</span>
151 </div><a class="card__btn btn btn--bordered" href="#">Подробнее об аренде</a>
152 </div>
153 </div>
154 <div class="card">
155 <div class="card__top"><img src="images/card/card-img-1.jpg" alt="Фото недвижимости" loading="lazy">
156 <h3 class="card__title">Салон красоты</h3>
157 <div class="card__labels"><span class="card__label card__label-favorites js_card_favorites">
158 <svg width="18" height="18">
159 <use xlink:href="images/sprite.svg#card-favorites-empty"></use>
160 </svg>
161 <svg width="18" height="18">
162 <use xlink:href="images/sprite.svg#card-favorites"></use>
163 </svg></span><a class="card__label card__label-messenger" href="#">
164 <svg width="25" height="25">
165 <use xlink:href="images/sprite.svg#card-messenger"></use>
166 </svg></a></div>
167 </div>
168 <div class="card__cnt">
169 <div class="card__info">
170 <address class="card__line card__line-complex">ЖК “Новинки 1”</address>
171 <address class="card__line">Фрунзенская (10 мин., пешком)<span style="background-color: #FFC955;"></span></address>
172 <address class="card__line">ул. Ак. Королева, д. 13, стр. 1, этаж 7, пом. 1, к. 69</address>
173 <div class="card__line">Площадь: <b>556 м2</b></div>
174 <div class="card__line">Цена за м<sup>2</sup>: <b>550 256 ₽</b></div>
175 </div>
176 <div class="card__price"><span>1 000 000 ₽</span>
177 </div><a class="card__btn btn btn--bordered" href="#">Подробнее</a>
178 </div>
179 </div>
180 <div class="card">
181 <div class="card__top"><img src="images/card/card-img-2.jpg" alt="Фото недвижимости" loading="lazy">
182 <h3 class="card__title">Барбер-шоп</h3>
183 <div class="card__labels"><span class="card__label card__label-favorites js_card_favorites">
184 <svg width="18" height="18">
185 <use xlink:href="images/sprite.svg#card-favorites-empty"></use>
186 </svg>
187 <svg width="18" height="18">
188 <use xlink:href="images/sprite.svg#card-favorites"></use>
189 </svg></span><a class="card__label card__label-messenger" href="#">
190 <svg width="25" height="25">
191 <use xlink:href="images/sprite.svg#card-messenger"></use>
192 </svg></a></div>
193 </div>
194 <div class="card__cnt">
195 <div class="card__info">
196 <address class="card__line card__line-complex">ЖК “Новоарбатский”</address>
197 <address class="card__line">Арбатская (8 мин., пешком)<span style="background-color: #0000A0;"></span></address>
198 <address class="card__line">г. Москва, ул. Дербеневская, д. 1, стр. 6, п. 4, эт. 2, к. 3.1.</address>
199 <div class="card__line">Площадь: <b>6 556 м2</b></div>
200 <div class="card__line">Цена за м<sup>2</sup>: <b>5 225 256 ₽</b></div>
201 </div>
202 <div class="card__price"><span>15 520 900 ₽</span><span>в месяц</span>
203 </div><a class="card__btn btn btn--bordered" href="#">Подробнее об аренде</a>
204 </div>
205 </div>
206 <div class="card">
207 <div class="card__top"><img src="images/card/card-img-3.jpg" alt="Фото недвижимости" loading="lazy">
208 <h3 class="card__title">Аптека</h3>
209 <div class="card__labels"><span class="card__label card__label-favorites js_card_favorites">
210 <svg width="18" height="18">
211 <use xlink:href="images/sprite.svg#card-favorites-empty"></use>
212 </svg>
213 <svg width="18" height="18">
214 <use xlink:href="images/sprite.svg#card-favorites"></use>
215 </svg></span><a class="card__label card__label-messenger" href="#">
216 <svg width="25" height="25">
217 <use xlink:href="images/sprite.svg#card-messenger"></use>
218 </svg></a></div>
219 </div>
220 <div class="card__cnt">
221 <div class="card__info">
222 <address class="card__line card__line-complex">ЖК “Садовые кварталы”</address>
223 <address class="card__line">Коломенская (2 мин., пешком)<span style="background-color: #029B55;"></span></address>
224 <address class="card__line">ул. Ак. Королева, д. 13, стр. 1, этаж 7, пом. 1, к. 69</address>
225 <div class="card__line">Площадь: <b>8 626 м2</b></div>
226 <div class="card__line">Цена за м<sup>2</sup>: <b>550 256 ₽</b></div>
227 </div>
228 <div class="card__price"><span>5 280 000 ₽</span>
229 </div><a class="card__btn btn btn--bordered" href="#">Подробнее о продаже</a>
230 </div>
231 </div>
232 <div class="card">
233 <div class="card__top"><img src="images/card/card-img-4.jpg" alt="Фото недвижимости" loading="lazy">
234 <h3 class="card__title">Витрина</h3>
235 <div class="card__labels"><span class="card__label card__label-favorites js_card_favorites">
236 <svg width="18" height="18">
237 <use xlink:href="images/sprite.svg#card-favorites-empty"></use>
238 </svg>
239 <svg width="18" height="18">
240 <use xlink:href="images/sprite.svg#card-favorites"></use>
241 </svg></span><a class="card__label card__label-messenger" href="#">
242 <svg width="25" height="25">
243 <use xlink:href="images/sprite.svg#card-messenger"></use>
244 </svg></a></div>
245 </div>
246 <div class="card__cnt">
247 <div class="card__info">
248 <address class="card__line card__line-complex">ЖК “Нахимовский проспект, 46”</address>
249 <address class="card__line">Парк Победы (5 мин., пешком)<span style="background-color: #222964;"></span></address>
250 <address class="card__line">г. Москва, ул. Дербеневская, д. 1, стр. 6, п. 4, эт. 2, к. 3.1.</address>
251 <div class="card__line">Площадь: <b>6 856 м2</b></div>
252 <div class="card__line">Цена за м<sup>2</sup>: <b>25 256 ₽</b></div>
253 </div>
254 <div class="card__price"><span>2 625 520 ₽</span><span>в месяц</span>
255 </div><a class="card__btn btn btn--bordered" href="#">Подробнее об аренде</a>
256 </div>
257 </div>
258 <div class="card">
259 <div class="card__top"><img src="images/card/card-img-1.jpg" alt="Фото недвижимости" loading="lazy">
260 <h3 class="card__title">Салон красоты</h3>
261 <div class="card__labels"><span class="card__label card__label-favorites js_card_favorites">
262 <svg width="18" height="18">
263 <use xlink:href="images/sprite.svg#card-favorites-empty"></use>
264 </svg>
265 <svg width="18" height="18">
266 <use xlink:href="images/sprite.svg#card-favorites"></use>
267 </svg></span><a class="card__label card__label-messenger" href="#">
268 <svg width="25" height="25">
269 <use xlink:href="images/sprite.svg#card-messenger"></use>
270 </svg></a></div>
271 </div>
272 <div class="card__cnt">
273 <div class="card__info">
274 <address class="card__line card__line-complex">ЖК “Новинки 1”</address>
275 <address class="card__line">Фрунзенская (10 мин., пешком)<span style="background-color: #FFC955;"></span></address>
276 <address class="card__line">ул. Ак. Королева, д. 13, стр. 1, этаж 7, пом. 1, к. 69</address>
277 <div class="card__line">Площадь: <b>556 м2</b></div>
278 <div class="card__line">Цена за м<sup>2</sup>: <b>550 256 ₽</b></div>
279 </div>
280 <div class="card__price"><span>1 000 000 ₽</span>
281 </div><a class="card__btn btn btn--bordered" href="#">Подробнее</a>
282 </div>
283 </div>
284 <div class="card">
285 <div class="card__top"><img src="images/card/card-img-2.jpg" alt="Фото недвижимости" loading="lazy">
286 <h3 class="card__title">Барбер-шоп</h3>
287 <div class="card__labels"><span class="card__label card__label-favorites js_card_favorites">
288 <svg width="18" height="18">
289 <use xlink:href="images/sprite.svg#card-favorites-empty"></use>
290 </svg>
291 <svg width="18" height="18">
292 <use xlink:href="images/sprite.svg#card-favorites"></use>
293 </svg></span><a class="card__label card__label-messenger" href="#">
294 <svg width="25" height="25">
295 <use xlink:href="images/sprite.svg#card-messenger"></use>
296 </svg></a></div>
297 </div>
298 <div class="card__cnt">
299 <div class="card__info">
300 <address class="card__line card__line-complex">ЖК “Новоарбатский”</address>
301 <address class="card__line">Арбатская (8 мин., пешком)<span style="background-color: #0000A0;"></span></address>
302 <address class="card__line">г. Москва, ул. Дербеневская, д. 1, стр. 6, п. 4, эт. 2, к. 3.1.</address>
303 <div class="card__line">Площадь: <b>6 556 м2</b></div>
304 <div class="card__line">Цена за м<sup>2</sup>: <b>5 225 256 ₽</b></div>
305 </div>
306 <div class="card__price"><span>15 520 900 ₽</span><span>в месяц</span>
307 </div><a class="card__btn btn btn--bordered" href="#">Подробнее об аренде</a>
308 </div>
309 </div>
310 <div class="card">
311 <div class="card__top"><img src="images/card/card-img-3.jpg" alt="Фото недвижимости" loading="lazy">
312 <h3 class="card__title">Аптека</h3>
313 <div class="card__labels"><span class="card__label card__label-favorites js_card_favorites">
314 <svg width="18" height="18">
315 <use xlink:href="images/sprite.svg#card-favorites-empty"></use>
316 </svg>
317 <svg width="18" height="18">
318 <use xlink:href="images/sprite.svg#card-favorites"></use>
319 </svg></span><a class="card__label card__label-messenger" href="#">
320 <svg width="25" height="25">
321 <use xlink:href="images/sprite.svg#card-messenger"></use>
322 </svg></a></div>
323 </div>
324 <div class="card__cnt">
325 <div class="card__info">
326 <address class="card__line card__line-complex">ЖК “Садовые кварталы”</address>
327 <address class="card__line">Коломенская (2 мин., пешком)<span style="background-color: #029B55;"></span></address>
328 <address class="card__line">ул. Ак. Королева, д. 13, стр. 1, этаж 7, пом. 1, к. 69</address>
329 <div class="card__line">Площадь: <b>8 626 м2</b></div>
330 <div class="card__line">Цена за м<sup>2</sup>: <b>550 256 ₽</b></div>
331 </div>
332 <div class="card__price"><span>5 280 000 ₽</span>
333 </div><a class="card__btn btn btn--bordered" href="#">Подробнее о продаже</a>
334 </div>
335 </div>
336 <div class="card">
337 <div class="card__top"><img src="images/card/card-img-4.jpg" alt="Фото недвижимости" loading="lazy">
338 <h3 class="card__title">Витрина</h3>
339 <div class="card__labels"><span class="card__label card__label-favorites js_card_favorites">
340 <svg width="18" height="18">
341 <use xlink:href="images/sprite.svg#card-favorites-empty"></use>
342 </svg>
343 <svg width="18" height="18">
344 <use xlink:href="images/sprite.svg#card-favorites"></use>
345 </svg></span><a class="card__label card__label-messenger" href="#">
346 <svg width="25" height="25">
347 <use xlink:href="images/sprite.svg#card-messenger"></use>
348 </svg></a></div>
349 </div>
350 <div class="card__cnt">
351 <div class="card__info">
352 <address class="card__line card__line-complex">ЖК “Нахимовский проспект, 46”</address>
353 <address class="card__line">Парк Победы (5 мин., пешком)<span style="background-color: #222964;"></span></address>
354 <address class="card__line">г. Москва, ул. Дербеневская, д. 1, стр. 6, п. 4, эт. 2, к. 3.1.</address>
355 <div class="card__line">Площадь: <b>6 856 м2</b></div>
356 <div class="card__line">Цена за м<sup>2</sup>: <b>25 256 ₽</b></div>
357 </div>
358 <div class="card__price"><span>2 625 520 ₽</span><span>в месяц</span>
359 </div><a class="card__btn btn btn--bordered" href="#">Подробнее об аренде</a>
360 </div>
361 </div>
362 <div class="card">
363 <div class="card__top"><img src="images/card/card-img-1.jpg" alt="Фото недвижимости" loading="lazy">
364 <h3 class="card__title">Салон красоты</h3>
365 <div class="card__labels"><span class="card__label card__label-favorites js_card_favorites">
366 <svg width="18" height="18">
367 <use xlink:href="images/sprite.svg#card-favorites-empty"></use>
368 </svg>
369 <svg width="18" height="18">
370 <use xlink:href="images/sprite.svg#card-favorites"></use>
371 </svg></span><a class="card__label card__label-messenger" href="#">
372 <svg width="25" height="25">
373 <use xlink:href="images/sprite.svg#card-messenger"></use>
374 </svg></a></div>
375 </div>
376 <div class="card__cnt">
377 <div class="card__info">
378 <address class="card__line card__line-complex">ЖК “Новинки 1”</address>
379 <address class="card__line">Фрунзенская (10 мин., пешком)<span style="background-color: #FFC955;"></span></address>
380 <address class="card__line">ул. Ак. Королева, д. 13, стр. 1, этаж 7, пом. 1, к. 69</address>
381 <div class="card__line">Площадь: <b>556 м2</b></div>
382 <div class="card__line">Цена за м<sup>2</sup>: <b>550 256 ₽</b></div>
383 </div>
384 <div class="card__price"><span>1 000 000 ₽</span>
385 </div><a class="card__btn btn btn--bordered" href="#">Подробнее</a>
386 </div>
387 </div>
388 <div class="card">
389 <div class="card__top"><img src="images/card/card-img-2.jpg" alt="Фото недвижимости" loading="lazy">
390 <h3 class="card__title">Барбер-шоп</h3>
391 <div class="card__labels"><span class="card__label card__label-favorites js_card_favorites">
392 <svg width="18" height="18">
393 <use xlink:href="images/sprite.svg#card-favorites-empty"></use>
394 </svg>
395 <svg width="18" height="18">
396 <use xlink:href="images/sprite.svg#card-favorites"></use>
397 </svg></span><a class="card__label card__label-messenger" href="#">
398 <svg width="25" height="25">
399 <use xlink:href="images/sprite.svg#card-messenger"></use>
400 </svg></a></div>
401 </div>
402 <div class="card__cnt">
403 <div class="card__info">
404 <address class="card__line card__line-complex">ЖК “Новоарбатский”</address>
405 <address class="card__line">Арбатская (8 мин., пешком)<span style="background-color: #0000A0;"></span></address>
406 <address class="card__line">г. Москва, ул. Дербеневская, д. 1, стр. 6, п. 4, эт. 2, к. 3.1.</address>
407 <div class="card__line">Площадь: <b>6 556 м2</b></div>
408 <div class="card__line">Цена за м<sup>2</sup>: <b>5 225 256 ₽</b></div>
409 </div>
410 <div class="card__price"><span>15 520 900 ₽</span><span>в месяц</span>
411 </div><a class="card__btn btn btn--bordered" href="#">Подробнее об аренде</a>
412 </div>
413 </div>
414 <div class="card">
415 <div class="card__top"><img src="images/card/card-img-3.jpg" alt="Фото недвижимости" loading="lazy">
416 <h3 class="card__title">Аптека</h3>
417 <div class="card__labels"><span class="card__label card__label-favorites js_card_favorites">
418 <svg width="18" height="18">
419 <use xlink:href="images/sprite.svg#card-favorites-empty"></use>
420 </svg>
421 <svg width="18" height="18">
422 <use xlink:href="images/sprite.svg#card-favorites"></use>
423 </svg></span><a class="card__label card__label-messenger" href="#">
424 <svg width="25" height="25">
425 <use xlink:href="images/sprite.svg#card-messenger"></use>
426 </svg></a></div>
427 </div>
428 <div class="card__cnt">
429 <div class="card__info">
430 <address class="card__line card__line-complex">ЖК “Садовые кварталы”</address>
431 <address class="card__line">Коломенская (2 мин., пешком)<span style="background-color: #029B55;"></span></address>
432 <address class="card__line">ул. Ак. Королева, д. 13, стр. 1, этаж 7, пом. 1, к. 69</address>
433 <div class="card__line">Площадь: <b>8 626 м2</b></div>
434 <div class="card__line">Цена за м<sup>2</sup>: <b>550 256 ₽</b></div>
435 </div>
436 <div class="card__price"><span>5 280 000 ₽</span>
437 </div><a class="card__btn btn btn--bordered" href="#">Подробнее о продаже</a>
438 </div>
439 </div>
440 <div class="card">
441 <div class="card__top"><img src="images/card/card-img-4.jpg" alt="Фото недвижимости" loading="lazy">
442 <h3 class="card__title">Витрина</h3>
443 <div class="card__labels"><span class="card__label card__label-favorites js_card_favorites">
444 <svg width="18" height="18">
445 <use xlink:href="images/sprite.svg#card-favorites-empty"></use>
446 </svg>
447 <svg width="18" height="18">
448 <use xlink:href="images/sprite.svg#card-favorites"></use>
449 </svg></span><a class="card__label card__label-messenger" href="#">
450 <svg width="25" height="25">
451 <use xlink:href="images/sprite.svg#card-messenger"></use>
452 </svg></a></div>
453 </div>
454 <div class="card__cnt">
455 <div class="card__info">
456 <address class="card__line card__line-complex">ЖК “Нахимовский проспект, 46”</address>
457 <address class="card__line">Парк Победы (5 мин., пешком)<span style="background-color: #222964;"></span></address>
458 <address class="card__line">г. Москва, ул. Дербеневская, д. 1, стр. 6, п. 4, эт. 2, к. 3.1.</address>
459 <div class="card__line">Площадь: <b>6 856 м2</b></div>
460 <div class="card__line">Цена за м<sup>2</sup>: <b>25 256 ₽</b></div>
461 </div>
462 <div class="card__price"><span>2 625 520 ₽</span><span>в месяц</span>
463 </div><a class="card__btn btn btn--bordered" href="#">Подробнее об аренде</a>
464 </div>
465 </div>
466 <div class="card">
467 <div class="card__top"><img src="images/card/card-img-1.jpg" alt="Фото недвижимости" loading="lazy">
468 <h3 class="card__title">Салон красоты</h3>
469 <div class="card__labels"><span class="card__label card__label-favorites js_card_favorites">
470 <svg width="18" height="18">
471 <use xlink:href="images/sprite.svg#card-favorites-empty"></use>
472 </svg>
473 <svg width="18" height="18">
474 <use xlink:href="images/sprite.svg#card-favorites"></use>
475 </svg></span><a class="card__label card__label-messenger" href="#">
476 <svg width="25" height="25">
477 <use xlink:href="images/sprite.svg#card-messenger"></use>
478 </svg></a></div>
479 </div>
480 <div class="card__cnt">
481 <div class="card__info">
482 <address class="card__line card__line-complex">ЖК “Новинки 1”</address>
483 <address class="card__line">Фрунзенская (10 мин., пешком)<span style="background-color: #FFC955;"></span></address>
484 <address class="card__line">ул. Ак. Королева, д. 13, стр. 1, этаж 7, пом. 1, к. 69</address>
485 <div class="card__line">Площадь: <b>556 м2</b></div>
486 <div class="card__line">Цена за м<sup>2</sup>: <b>550 256 ₽</b></div>
487 </div>
488 <div class="card__price"><span>1 000 000 ₽</span>
489 </div><a class="card__btn btn btn--bordered" href="#">Подробнее</a>
490 </div>
491 </div>
492 <div class="card">
493 <div class="card__top"><img src="images/card/card-img-2.jpg" alt="Фото недвижимости" loading="lazy">
494 <h3 class="card__title">Барбер-шоп</h3>
495 <div class="card__labels"><span class="card__label card__label-favorites js_card_favorites">
resources/views/favorite.blade.php
1 @extends('layout.site', ['title' => 'Избранное RentTorg']) 1 @extends('layout.site', ['title' => 'Избранное RentTorg'])
2 2
3 @section('content') 3 @section('content')
4 <section class="favorites"> 4 <section class="favorites">
5 <div class="favorites-top"> 5 <div class="favorites-top">
6 <div class="container"> 6 <div class="container">
7 <div class="breadcrumbs"> 7 <div class="breadcrumbs">
8 <ul class="breadcrumbs__list"> 8 <ul class="breadcrumbs__list">
9 <li class="breadcrumbs__item"><a class="breadcrumbs__link" href="#">Главная</a></li> 9 <li class="breadcrumbs__item"><a class="breadcrumbs__link" href="{{ route('index') }}">Главная</a></li>
10 <li class="breadcrumbs__item"><span class="breadcrumbs__link">Избранное </span></li> 10 <li class="breadcrumbs__item"><span class="breadcrumbs__link">Избранное </span></li>
11 </ul> 11 </ul>
12 </div> 12 </div>
13 <h1 class="favorites__title title-main">Тут пока что ничего нет...</h1><a class="favorites-top__link" href="#">Выберите идеальную недвижимость </a> 13 <h1 class="favorites__title title-main">Тут пока что ничего нет...</h1><a class="favorites-top__link" href=" {{ route('catalog') }}">Выберите идеальную недвижимость </a>
14 <p class="favorites__descr">Здесь вы можете ознакомиться с недвижимостью которая вам понравилось</p> 14 <p class="favorites__descr">Здесь вы можете ознакомиться с недвижимостью которая вам понравилось</p>
15 </div> 15 </div>
16 </div> 16 </div>
17 <div class="favorites-cnt"> 17 <div class="favorites-cnt">
18 <div class="container"> 18 <div class="container">
19 <div class="favorites__items"> 19 <div class="favorites__items">
20 <div class="favorites-item"> 20 <div class="favorites-item">
21 <div class="favorites-item__img"><img src="images/favorites/favorites-item-img-1.svg" alt=""></div> 21 <div class="favorites-item__img"><img src="images/favorites/favorites-item-img-1.svg" alt=""></div>
22 <p class="favorites-item__descr"><a href="#">Найдите</a> идеальную планировку на сайте Renttorg</p> 22 <p class="favorites-item__descr"><a href="{{ route('catalog') }}">Найдите</a> идеальную планировку на сайте Renttorg</p>
23 </div> 23 </div>
24 <div class="favorites-item"> 24 <div class="favorites-item">
25 <div class="favorites-item__img"><img src="images/favorites/favorites-item-img-2.svg" alt=""></div> 25 <div class="favorites-item__img"><img src="images/favorites/favorites-item-img-2.svg" alt=""></div>
26 <p class="favorites-item__descr">Нажмите на <img src="images/favorites-icon-mini.svg" alt=""> для добавления недвижемости в избранное</p> 26 <p class="favorites-item__descr">Нажмите на <img src="images/favorites-icon-mini.svg" alt=""> для добавления недвижемости в избранное</p>
27 </div> 27 </div>
28 <div class="favorites-item"> 28 <div class="favorites-item">
29 <div class="favorites-item__img"><img src="images/favorites/favorites-item-img-3.svg" alt=""></div> 29 <div class="favorites-item__img"><img src="images/favorites/favorites-item-img-3.svg" alt=""></div>
30 <p class="favorites-item__descr">Перейдите в избранное или сравнение для выбора планировки</p> 30 <p class="favorites-item__descr">Перейдите в избранное или сравнение для выбора планировки</p>
31 </div> 31 </div>
32 </div> 32 </div>
33 </div> 33 </div>
34 </div> 34 </div>
35 </section> 35 </section>
36 @endsection 36 @endsection
37 37
38 @section('form_feedback') 38 @section('form_feedback')
39 <!-- Форма обратной связи --> 39 <!-- Форма обратной связи -->
40 @include('form.form_feedback') 40 @include('form.form_feedback')
41 @endsection 41 @endsection
42 42
resources/views/layout/site.blade.php
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> 2 <html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
3 <head> 3 <head>
4 <meta charset="UTF-8"> 4 <meta charset="UTF-8">
5 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 5 <meta http-equiv="X-UA-Compatible" content="IE=edge">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 6 <meta name="viewport" content="width=device-width, initial-scale=1.0">
7 <title>{{$title}}</title> 7 <title>{{$title}}</title>
8 <link rel="preload" href="{{ asset('fonts/Manrope-ExtraLight.woff2') }}" as="font" type="font/woff2" crossorigin> 8 <link rel="preload" href="{{ asset('fonts/Manrope-ExtraLight.woff2') }}" as="font" type="font/woff2" crossorigin>
9 <link rel="preload" href="{{ asset('fonts/Manrope-Light.woff2" as="font') }}" type="font/woff2" crossorigin> 9 <link rel="preload" href="{{ asset('fonts/Manrope-Light.woff2" as="font') }}" type="font/woff2" crossorigin>
10 <link rel="preload" href="{{ asset('fonts/Manrope-Regular.woff2') }}" as="font" type="font/woff2" crossorigin> 10 <link rel="preload" href="{{ asset('fonts/Manrope-Regular.woff2') }}" as="font" type="font/woff2" crossorigin>
11 <link rel="preload" href="{{ asset('fonts/Manrope-Medium.woff2') }}" as="font" type="font/woff2" crossorigin> 11 <link rel="preload" href="{{ asset('fonts/Manrope-Medium.woff2') }}" as="font" type="font/woff2" crossorigin>
12 <link rel="preload" href="{{ asset('fonts/Manrope-SemiBold.woff2') }}" as="font" type="font/woff2" crossorigin> 12 <link rel="preload" href="{{ asset('fonts/Manrope-SemiBold.woff2') }}" as="font" type="font/woff2" crossorigin>
13 <link rel="preload" href="{{ asset('fonts/Manrope-Bold.woff2') }}" as="font" type="font/woff2" crossorigin> 13 <link rel="preload" href="{{ asset('fonts/Manrope-Bold.woff2') }}" as="font" type="font/woff2" crossorigin>
14 <link rel="preload" href="{{ asset('fonts/Manrope-ExtraBold.woff2') }}" as="font" type="font/woff2" crossorigin> 14 <link rel="preload" href="{{ asset('fonts/Manrope-ExtraBold.woff2') }}" as="font" type="font/woff2" crossorigin>
15 <link rel="stylesheet" href="{{ asset('css/swiper-bundle.min.css') }}"> 15 <link rel="stylesheet" href="{{ asset('css/swiper-bundle.min.css') }}">
16 <link rel="stylesheet" href="{{ asset('css/style.css') }}"> 16 <link rel="stylesheet" href="{{ asset('css/style.css') }}">
17 </head> 17 </head>
18 <body> 18 <body>
19 <div class="spinner"></div> 19 <div class="spinner"></div>
20 <div class="wrapper"> 20 <div class="wrapper">
21 <header class="header js_header"> 21 <header class="header js_header">
22 <div class="container"> 22 <div class="container">
23 <div class="header__wrap"><a class="header__logo" href="{{ route('index') }}"><img src="{{ asset('images/logo.svg') }}" alt="Лого"></a> 23 <div class="header__wrap"><a class="header__logo" href="{{ route('index') }}"><img src="{{ asset('images/logo.svg') }}" alt="Лого"></a>
24 <nav class="header__nav nav"> 24 <nav class="header__nav nav">
25 <ul class="nav__list"> 25 <ul class="nav__list">
26 <li class="nav__item"><a class="nav__link" href="{{ route('catalog') }}">Каталог</a></li> 26 <li class="nav__item"><a class="nav__link" href="{{ route('catalog') }}">Каталог</a></li>
27 <li class="nav__item"><a class="nav__link" href="{{ route('about') }}">О компании</a></li> 27 <li class="nav__item"><a class="nav__link" href="{{ route('about') }}">О компании</a></li>
28 <li class="nav__item"><a class="nav__link" href="{{ route('contact') }}">Контакты</a></li> 28 <li class="nav__item"><a class="nav__link" href="{{ route('contact') }}">Контакты</a></li>
29 <li class="nav__item"><a class="nav__link nav__link-favorites" href="{{ route('favorite') }}">Избранное<span>0</span></a></li> 29 <li class="nav__item"><a class="nav__link nav__link-favorites" href="{{ route('favorite') }}">Избранное<span>0</span></a></li>
30 </ul> 30 </ul>
31 </nav> 31 </nav>
32 <div class="header__buttons"><a class="header__btn-phone" href="#" data-btn="feedback"> 32 <div class="header__buttons"><a class="header__btn-phone" href="#" data-btn="feedback">
33 <svg width="22" height="22"> 33 <svg width="22" height="22">
34 <use xlink:href="{{ asset('images/sprite.svg#header-btn-phone') }}"></use> 34 <use xlink:href="{{ asset('images/sprite.svg#header-btn-phone') }}"></use>
35 </svg></a> 35 </svg></a>
36 <div class="header__contacts"> 36 <div class="header__contacts">
37 <div class="header__col"><a class="header__contact" href="mailto:{{ $items_contact[0]->email }}">{{ $items_contact[0]->email }}</a></div> 37 <div class="header__col"><a class="header__contact" href="mailto:{{ $items_contact[0]->email }}">{{ $items_contact[0]->email }}</a></div>
38 <div class="header__col"><a class="header__contact" href="tel:{{ $items_contact[0]->email }}">{{ $items_contact[0]->telephone }}</a> 38 <div class="header__col"><a class="header__contact" href="tel:{{ $items_contact[0]->email }}">{{ $items_contact[0]->telephone }}</a>
39 <button class="header__btn-callback" type="button" data-btn="feedback">Обратный звонок</button> 39 <button class="header__btn-callback" type="button" data-btn="feedback">Обратный звонок</button>
40 </div> 40 </div>
41 </div> 41 </div>
42 <button class="header__burger js_header_burger" type="button">Меню 42 <button class="header__burger js_header_burger" type="button">Меню
43 <svg width="28" height="18"> 43 <svg width="28" height="18">
44 <use xlink:href="{{ asset('images/sprite.svg#burger') }}"></use> 44 <use xlink:href="{{ asset('images/sprite.svg#burger') }}"></use>
45 </svg> 45 </svg>
46 </button> 46 </button>
47 </div> 47 </div>
48 <div class="menu js_menu"> 48 <div class="menu js_menu">
49 <div class="menu__wrap"> 49 <div class="menu__wrap">
50 <button class="menu__close js_menu_close" type="button">Меню 50 <button class="menu__close js_menu_close" type="button">Меню
51 <svg width="20" height="20"> 51 <svg width="20" height="20">
52 <use xlink:href="{{ asset('images/sprite.svg#popup-close') }}"></use> 52 <use xlink:href="{{ asset('images/sprite.svg#popup-close') }}"></use>
53 </svg> 53 </svg>
54 </button> 54 </button>
55 <div class="menu__inner"> 55 <div class="menu__inner">
56 <nav class="menu__nav"> 56 <nav class="menu__nav">
57 <ul class="menu__list"> 57 <ul class="menu__list">
58 <li class="menu__item"><a class="menu__link" href="{{ route('about') }}">О компании</a></li> 58 <li class="menu__item"><a class="menu__link" href="{{ route('about') }}">О компании</a></li>
59 <li class="menu__item"><a class="menu__link menu__link-favorites" href="{{ route('favorite') }}">Избранное<span>5</span></a></li> 59 <li class="menu__item"><a class="menu__link menu__link-favorites" href="{{ route('favorite') }}">Избранное<span>5</span></a></li>
60 <li class="menu__item"><a class="menu__link" href="{{ route('catalog') }}">Каталог</a></li> 60 <li class="menu__item"><a class="menu__link" href="{{ route('catalog') }}">Каталог</a></li>
61 <li class="menu__item"><a class="menu__link" href="{{ route('news') }}">Новости</a></li> 61 <li class="menu__item"><a class="menu__link" href="{{ route('news') }}">Новости</a></li>
62 <li class="menu__item"><a class="menu__link" href="{{ route('contact') }}">Контакты</a></li> 62 <li class="menu__item"><a class="menu__link" href="{{ route('contact') }}">Контакты</a></li>
63 </ul> 63 </ul>
64 </nav> 64 </nav>
65 <div class="menu__contacts"><a class="menu__contact" href="mailto:info@renttorg.ru">E-MAIL<span>info@renttorg.ru</span></a><a class="menu__contact" href="tel:+79290127262">ТЕЛЕФОН<span>+7 (929) 012-72-62</span></a></div> 65 <div class="menu__contacts"><a class="menu__contact" href="mailto:info@renttorg.ru">E-MAIL<span>info@renttorg.ru</span></a><a class="menu__contact" href="tel:+79290127262">ТЕЛЕФОН<span>+7 (929) 012-72-62</span></a></div>
66 <div class="menu__social social"> 66 <div class="menu__social social">
67 <ul class="social__list"> 67 <ul class="social__list">
68 <li class="social__item"><a class="social__link" href="#" target="_blank"><img src="images/tg.svg" alt=""></a></li> 68 <li class="social__item"><a class="social__link" href="#" target="_blank"><img src="images/tg.svg" alt=""></a></li>
69 <li class="social__item"><a class="social__link" href="#" target="_blank"> 69 <li class="social__item"><a class="social__link" href="#" target="_blank">
70 <svg width="40" height="40"> 70 <svg width="40" height="40">
71 <use xlink:href="{{ asset('images/sprite.svg#wa')}}"></use> 71 <use xlink:href="{{ asset('images/sprite.svg#wa')}}"></use>
72 </svg></a></li> 72 </svg></a></li>
73 </ul> 73 </ul>
74 </div> 74 </div>
75 </div> 75 </div>
76 </div> 76 </div>
77 </div> 77 </div>
78 </div> 78 </div>
79 </div> 79 </div>
80 </header> 80 </header>
81 <main> 81 <main>
82 @if ($message = Session::get('success'))
83 <div class="alert alert-success alert-dismissible mt-0" role="alert">
84 <button type="button" class="close" data-dismiss="alert" aria-label="Закрыть">
85 <span aria-hidden="true">&times;</span>
86 </button>
87 {{ $message }}
88 </div>
89 @endif
90 82
91 @if ($errors->any())
92 <div class="alert alert-danger alert-dismissible mt-4" role="alert">
93 <button type="button" class="close" data-dismiss="alert" aria-label="Закрыть">
94 <span aria-hidden="true">&times;</span>
95 </button>
96 <ul class="mb-0">
97 @foreach ($errors->all() as $error)
98 <li>{{ $error }}</li>
99 @endforeach
100 </ul>
101 </div>
102 @endif
103 83
104 <!-- Фильтр --> 84 <!-- Фильтр -->
105 @yield('filter') 85 @yield('filter')
106 86
87 @if ($message = Session::get('success'))
88 <section>
89 <div class="alert alert-success alert-dismissible mt-0" role="alert">
90 <button type="button" class="close" data-dismiss="alert" aria-label="Закрыть">
91 <span aria-hidden="true">&times;</span>
92 </button>
93 {{ $message }}
94 </div>
95 </section>
96 @endif
97
98 @if ($errors->any())
99 <section>
100 <div class="alert alert-danger alert-dismissible mt-4" role="alert">
101 <button type="button" class="close" data-dismiss="alert" aria-label="Закрыть">
102 <span aria-hidden="true">&times;</span>
103 </button>
104 <ul class="mb-0">
105 @foreach ($errors->all() as $error)
106 <li>{{ $error }}</li>
107 @endforeach
108 </ul>
109 </div>
110 </section>
111 @endif
107 <!-- Основной контент --> 112 <!-- Основной контент -->
108 @yield('content') 113 @yield('content')
109 114
110 </main> 115 </main>
111 116
112 <footer class="footer" style="background-image:url({{ asset('images/footer-bg.jpg')}})"> 117 <footer class="footer" style="background-image:url({{ asset('images/footer-bg.jpg')}})">
113 <div class="footer__buttons"> 118 <div class="footer__buttons">
114 <button class="footer__btn footer__btn-phone js_btn_contact_us" type="button"> 119 <button class="footer__btn footer__btn-phone js_btn_contact_us" type="button">
115 <svg width="30" height="32"> 120 <svg width="30" height="32">
116 <use xlink:href="{{ asset('images/sprite.svg#footer-btn-phone')}}"></use> 121 <use xlink:href="{{ asset('images/sprite.svg#footer-btn-phone')}}"></use>
117 </svg> 122 </svg>
118 </button> 123 </button>
119 <button class="footer__btn footer__btn-up js_btn_up" type="button"> 124 <button class="footer__btn footer__btn-up js_btn_up" type="button">
120 <svg width="19" height="11"> 125 <svg width="19" height="11">
121 <use xlink:href="{{ asset('images/sprite.svg#footer-btn-up')}}"></use> 126 <use xlink:href="{{ asset('images/sprite.svg#footer-btn-up')}}"></use>
122 </svg> 127 </svg>
123 </button> 128 </button>
124 </div> 129 </div>
125 <!-- Форма обратной связи --> 130 <!-- Форма обратной связи -->
126 @yield('form_feedback'); 131 @yield('form_feedback')
127 132
128 <!-- Сам футер мееню --> 133 <!-- Сам футер мееню -->
129 <div class="footer-middle"> 134 <div class="footer-middle">
130 <div class="container"> 135 <div class="container">
131 <div class="footer-middle__wrap"> 136 <div class="footer-middle__wrap">
132 <div class="footer__col footer__col-intro"><a class="footer__logo" href="index.html"><img src="{{ asset('images/logo-footer.svg')}}" alt="Лого"></a> 137 <div class="footer__col footer__col-intro"><a class="footer__logo" href="index.html"><img src="{{ asset('images/logo-footer.svg')}}" alt="Лого"></a>
133 <p class="footer__descr">В группу “Renttorg” входит ряд ведущих российских девелоперских компаний полного цикла, реализующих масштабные объекты недвижимости.</p> 138 <p class="footer__descr">В группу “Renttorg” входит ряд ведущих российских девелоперских компаний полного цикла, реализующих масштабные объекты недвижимости.</p>
134 <div class="footer-questions"> 139 <div class="footer-questions">
135 <h3 class="footer-questions__title">Есть вопросы или предложения?</h3><a class="footer-questions__btn btn btn--main" href="#" data-btn="feedback">Напишите нам</a> 140 <h3 class="footer-questions__title">Есть вопросы или предложения?</h3><a class="footer-questions__btn btn btn--main" href="#" data-btn="feedback">Напишите нам</a>
136 </div> 141 </div>
137 </div> 142 </div>
138 <div class="footer__col footer__col-menu js_footer_col"> 143 <div class="footer__col footer__col-menu js_footer_col">
139 <h3 class="footer__caption js_footer_caption">Меню</h3> 144 <h3 class="footer__caption js_footer_caption">Меню</h3>
140 <div class="footer__block js_footer_block"> 145 <div class="footer__block js_footer_block">
141 <ul class="footer__list"> 146 <ul class="footer__list">
142 <li class="footer__item"><a class="footer__link" href="{{ route('catalog') }}">Каталог</a></li> 147 <li class="footer__item"><a class="footer__link" href="{{ route('catalog') }}">Каталог</a></li>
143 <li class="footer__item"><a class="footer__link" href="{{ route('about') }}">О компании</a></li> 148 <li class="footer__item"><a class="footer__link" href="{{ route('about') }}">О компании</a></li>
144 <li class="footer__item"><a class="footer__link" href="{{ route('contact') }}">Контакты</a></li> 149 <li class="footer__item"><a class="footer__link" href="{{ route('contact') }}">Контакты</a></li>
145 <li class="footer__item"><a class="footer__link" href="{{ route('favorite') }}">Избранное</a></li> 150 <li class="footer__item"><a class="footer__link" href="{{ route('favorite') }}">Избранное</a></li>
146 <li class="footer__item"><a class="footer__link" href="{{ route('news') }}">Новости</a></li> 151 <li class="footer__item"><a class="footer__link" href="{{ route('news') }}">Новости</a></li>
147 </ul> 152 </ul>
148 153
149 </div><a class="footer__author" href="#" target="_blank"><img src="{{ asset('images/author.png')}}" alt="Лого разработчика"></a> 154 </div><a class="footer__author" href="#" target="_blank"><img src="{{ asset('images/author.png')}}" alt="Лого разработчика"></a>
150 </div> 155 </div>
151 <div class="footer__col js_footer_col"> 156 <div class="footer__col js_footer_col">
152 <h3 class="footer__caption js_footer_caption">Услуги</h3> 157 <h3 class="footer__caption js_footer_caption">Услуги</h3>
153 <div class="footer__block js_footer_block"> 158 <div class="footer__block js_footer_block">
154 <ul class="footer__list"> 159 <ul class="footer__list">
155 <li class="footer__item"><a class="footer__link" href="#">Продажа арендного бизнеса</a></li> 160 <li class="footer__item"><a class="footer__link" href="#">Продажа арендного бизнеса</a></li>
156 <li class="footer__item"><a class="footer__link" href="#">Арендованные помещения</a></li> 161 <li class="footer__item"><a class="footer__link" href="#">Арендованные помещения</a></li>
157 <li class="footer__item"><a class="footer__link" href="#">Свободные для аренды</a></li> 162 <li class="footer__item"><a class="footer__link" href="#">Свободные для аренды</a></li>
158 </ul> 163 </ul>
159 </div> 164 </div>
160 </div> 165 </div>
161 <div class="footer__col js_footer_col"> 166 <div class="footer__col js_footer_col">
162 <h3 class="footer__caption js_footer_caption">Объекты</h3> 167 <h3 class="footer__caption js_footer_caption">Объекты</h3>
163 <div class="footer__block js_footer_block"> 168 <div class="footer__block js_footer_block">
164 <ul class="footer__list"> 169 <ul class="footer__list">
165 <li class="footer__item"><a class="footer__link" href="#">Новая Москва</a></li> 170 <li class="footer__item"><a class="footer__link" href="#">Новая Москва</a></li>
166 <li class="footer__item"><a class="footer__link" href="#">Подмосковье</a></li> 171 <li class="footer__item"><a class="footer__link" href="#">Подмосковье</a></li>
167 <li class="footer__item"><a class="footer__link" href="#">Москва</a></li> 172 <li class="footer__item"><a class="footer__link" href="#">Москва</a></li>
168 <li class="footer__item"><a class="footer__link" href="#">Тип недвижимости</a></li> 173 <li class="footer__item"><a class="footer__link" href="#">Тип недвижимости</a></li>
169 </ul> 174 </ul>
170 </div> 175 </div>
171 </div> 176 </div>
172 <div class="footer__col footer__col-contacts"> 177 <div class="footer__col footer__col-contacts">
173 <h3 class="footer__caption js_footer_caption">Контакты</h3> 178 <h3 class="footer__caption js_footer_caption">Контакты</h3>
174 <ul class="footer__list"> 179 <ul class="footer__list">
175 <li class="footer__item"><a class="footer__link" href="#mailto:{{ $items_contact[0]->email }}">{{ $items_contact[0]->email }}</a></li> 180 <li class="footer__item"><a class="footer__link" href="#mailto:{{ $items_contact[0]->email }}">{{ $items_contact[0]->email }}</a></li>
176 <li class="footer__item"><a class="footer__link" href="tel:{{ $items_contact[0]->telephone }}">{{ $items_contact[0]->telephone }}</a></li> 181 <li class="footer__item"><a class="footer__link" href="tel:{{ $items_contact[0]->telephone }}">{{ $items_contact[0]->telephone }}</a></li>
177 </ul> 182 </ul>
178 <div class="footer__social social"> 183 <div class="footer__social social">
179 <ul class="social__list"> 184 <ul class="social__list">
180 <li class="social__item"><a class="social__link" href="#" target="_blank"><img src="{{ asset('images/tg.svg')}}" alt=""></a></li> 185 <li class="social__item"><a class="social__link" href="#" target="_blank"><img src="{{ asset('images/tg.svg')}}" alt=""></a></li>
181 <li class="social__item"><a class="social__link" href="#" target="_blank"> 186 <li class="social__item"><a class="social__link" href="#" target="_blank">
182 <svg width="40" height="40"> 187 <svg width="40" height="40">
183 <use xlink:href="{{ asset('images/sprite.svg#wa') }}"></use> 188 <use xlink:href="{{ asset('images/sprite.svg#wa') }}"></use>
184 </svg></a></li> 189 </svg></a></li>
185 </ul> 190 </ul>
186 </div> 191 </div>
187 </div> 192 </div>
188 </div> 193 </div>
189 </div> 194 </div>
190 </div> 195 </div>
191 196
192
193 <div class="footer-bottom"> 197 <div class="footer-bottom">
194 <div class="container"> 198 <div class="container">
195 <div class="footer-bottom__wrap"> 199 <div class="footer-bottom__wrap">
196 <div class="footer__copy">© 2023 RentTorg</div><a class="footer__plicy" href="{{ route('conf') }}">Политика конфиденциальности</a> 200 <div class="footer__copy">© 2023 RentTorg</div><a class="footer__plicy" href="{{ route('conf') }}">Политика конфиденциальности</a>
197 </div> 201 </div>
198 </div> 202 </div>
199 </div> 203 </div>
200 </footer> 204 </footer>
201 </div> 205 </div>
202 206
203 <!-- Вплывающие окна --> 207 <!-- Вплывающие окна -->
204 <div class="popup popup-feedback" data-popup="feedback"> 208 <div class="popup popup-feedback" data-popup="feedback">
205 <div class="popup__wrap"> 209 <div class="popup__wrap">
206 <button class="popup__close js_popup_close" type="button"> 210 <button class="popup__close js_popup_close" type="button">
207 <svg width="20" height="20"> 211 <svg width="20" height="20">
208 <use xlink:href="images/sprite.svg#popup-close"></use> 212 <use xlink:href="images/sprite.svg#popup-close"></use>
209 </svg> 213 </svg>
210 </button> 214 </button>
211 <form class="popup-feedback__form js_popup_feedback_form"> 215 <form class="popup-feedback__form js_popup_feedback_form">
212 <div class="popup-feedback__title">Как с вами связаться</div> 216 <div class="popup-feedback__title">Как с вами связаться</div>
213 <div class="popup-feedback__fields"> 217 <div class="popup-feedback__fields">
214 <label class="popup-feedback__field field"> 218 <label class="popup-feedback__field field">
215 <input type="text" placeholder="Имя" name="Имя"> 219 <input type="text" placeholder="Имя" name="Имя">
216 </label> 220 </label>
217 <label class="popup-feedback__field field"> 221 <label class="popup-feedback__field field">
218 <input class="js_input_phone" type="text" placeholder="Телефон" name="Телефон"> 222 <input class="js_input_phone" type="text" placeholder="Телефон" name="Телефон">
219 </label> 223 </label>
220 </div> 224 </div>
221 <button class="popup-feedback__btn btn btn--main js_form_btn">Отправить</button> 225 <button class="popup-feedback__btn btn btn--main js_form_btn">Отправить</button>
222 <p class="popup-feedback__confirm">Нажимая на кнопку «Отправить», Вы даете согласие на обработку персональных данных в соответствии с <a href="#">Политикой конфиденциальности</a>.</p> 226 <p class="popup-feedback__confirm">Нажимая на кнопку «Отправить», Вы даете согласие на обработку персональных данных в соответствии с <a href="#">Политикой конфиденциальности</a>.</p>
223 </form> 227 </form>
224 </div> 228 </div>
225 </div> 229 </div>
226 <div class="popup popup-feedback" data-popup="viewing"> 230 <div class="popup popup-feedback" data-popup="viewing">
227 <div class="popup__wrap"> 231 <div class="popup__wrap">
228 <button class="popup__close js_popup_close" type="button"> 232 <button class="popup__close js_popup_close" type="button">
229 <svg width="20" height="20"> 233 <svg width="20" height="20">
230 <use xlink:href="images/sprite.svg#popup-close"></use> 234 <use xlink:href="images/sprite.svg#popup-close"></use>
231 </svg> 235 </svg>
232 </button> 236 </button>
233 <form class="popup-feedback__form js_popup_viewing_form"> 237 <form class="popup-feedback__form js_popup_viewing_form">
234 <div class="popup-feedback__title">Записаться на просмотр</div> 238 <div class="popup-feedback__title">Записаться на просмотр</div>
235 <div class="popup-feedback__fields"> 239 <div class="popup-feedback__fields">
236 <label class="popup-feedback__field field"> 240 <label class="popup-feedback__field field">
237 <input type="text" placeholder="Имя" name="Имя"> 241 <input type="text" placeholder="Имя" name="Имя">
238 </label> 242 </label>
239 <label class="popup-feedback__field field"> 243 <label class="popup-feedback__field field">
240 <input class="js_input_phone" type="text" placeholder="Телефон" name="Телефон"> 244 <input class="js_input_phone" type="text" placeholder="Телефон" name="Телефон">
241 </label> 245 </label>
242 </div> 246 </div>
243 <button class="popup-feedback__btn btn btn--main js_form_btn">Отправить</button> 247 <button class="popup-feedback__btn btn btn--main js_form_btn">Отправить</button>
244 <p class="popup-feedback__confirm">Нажимая на кнопку «Отправить», Вы даете согласие на обработку персональных данных в соответствии с <a href="#">Политикой конфиденциальности</a>.</p> 248 <p class="popup-feedback__confirm">Нажимая на кнопку «Отправить», Вы даете согласие на обработку персональных данных в соответствии с <a href="#">Политикой конфиденциальности</a>.</p>
245 </form> 249 </form>
246 </div> 250 </div>
247 </div> 251 </div>
248 <div class="popup popup-success" data-popup="success"> 252 <div class="popup popup-success" data-popup="success">
249 <div class="popup__wrap"> 253 <div class="popup__wrap">
250 <button class="popup__close js_popup_close" type="button"> 254 <button class="popup__close js_popup_close" type="button">
251 <svg width="20" height="20"> 255 <svg width="20" height="20">
252 <use xlink:href="images/sprite.svg#popup-close"></use> 256 <use xlink:href="images/sprite.svg#popup-close"></use>
253 </svg> 257 </svg>
254 </button> 258 </button>
255 <div class="popup-success__inner"> 259 <div class="popup-success__inner">
256 <div class="popup-success__logo"> 260 <div class="popup-success__logo">
257 <svg width="48" height="39"> 261 <svg width="48" height="39">
258 <use xlink:href="images/sprite.svg#popup-success-logo"></use> 262 <use xlink:href="images/sprite.svg#popup-success-logo"></use>
259 </svg> 263 </svg>
260 </div> 264 </div>
261 <div class="popup-success__title">Спасибо за заявку</div> 265 <div class="popup-success__title">Спасибо за заявку</div>
262 <p class="popup-success__descr">В ближайшее время с вами свяжется наш специалист для уточнения деталей вашей задачи.</p> 266 <p class="popup-success__descr">В ближайшее время с вами свяжется наш специалист для уточнения деталей вашей задачи.</p>
263 </div> 267 </div>
264 </div> 268 </div>
265 </div> 269 </div>
266 <div class="popup popup-feedback" data-popup="sending"> 270 <div class="popup popup-feedback" data-popup="sending">
267 <div class="popup__wrap"> 271 <div class="popup__wrap">
268 <button class="popup__close js_popup_close" type="button"> 272 <button class="popup__close js_popup_close" type="button">
269 <svg width="20" height="20"> 273 <svg width="20" height="20">
270 <use xlink:href="images/sprite.svg#popup-close"></use> 274 <use xlink:href="images/sprite.svg#popup-close"></use>
271 </svg> 275 </svg>
272 </button> 276 </button>
273 <form class="popup-feedback__form js_popup_sending_form"> 277 <form class="popup-feedback__form js_popup_sending_form">
274 <div class="popup-feedback__title">Отправить на почту</div> 278 <div class="popup-feedback__title">Отправить на почту</div>
275 <div class="popup-feedback__fields"> 279 <div class="popup-feedback__fields">
276 <label class="popup-feedback__field field"> 280 <label class="popup-feedback__field field">
277 <input class="js_input_email" type="text" placeholder="Электронная почта" name="Электронная почта"> 281 <input class="js_input_email" type="text" placeholder="Электронная почта" name="Электронная почта">
278 </label> 282 </label>
279 </div> 283 </div>
280 <button class="popup-feedback__btn btn btn--main js_form_btn">Отправить</button> 284 <button class="popup-feedback__btn btn btn--main js_form_btn">Отправить</button>
281 <p class="popup-feedback__confirm">Нажимая на кнопку «Отправить», Вы даете согласие на обработку персональных данных в соответствии с <a href="#">Политикой конфиденциальности</a>.</p> 285 <p class="popup-feedback__confirm">Нажимая на кнопку «Отправить», Вы даете согласие на обработку персональных данных в соответствии с <a href="#">Политикой конфиденциальности</a>.</p>
282 </form> 286 </form>
283 </div> 287 </div>
284 </div> 288 </div>
285 <div class="contact-us js_contact_us"> 289 <div class="contact-us js_contact_us">
286 <div class="contact-us__top"> 290 <div class="contact-us__top">
287 <button class="contact-us__close js_contact_us_close" type="button"> 291 <button class="contact-us__close js_contact_us_close" type="button">
288 <svg width="20" height="20"> 292 <svg width="20" height="20">
289 <use xlink:href="images/sprite.svg#popup-close"></use> 293 <use xlink:href="images/sprite.svg#popup-close"></use>
290 </svg> 294 </svg>
291 </button> 295 </button>
292 <div class="contact-us__title">Свяжитесь с нами</div> 296 <div class="contact-us__title">Свяжитесь с нами</div>
293 </div> 297 </div>
294 <div class="contact-us__body"> 298 <div class="contact-us__body">
295 <div class="contact-us__items"><a class="contact-us-item js_contact_us_close" href="#"> 299 <div class="contact-us__items"><a class="contact-us-item js_contact_us_close" href="#">
296 <div class="contact-us-item__icon"> 300 <div class="contact-us-item__icon">
297 <svg width="34" height="34"> 301 <svg width="34" height="34">
298 <use xlink:href="images/sprite.svg#contact-us-phone"></use> 302 <use xlink:href="images/sprite.svg#contact-us-phone"></use>
299 </svg> 303 </svg>
300 </div> 304 </div>
301 <div class="contact-us-item__name">Позвонить</div></a><a class="contact-us-item js_contact_us_close" href="#"> 305 <div class="contact-us-item__name">Позвонить</div></a><a class="contact-us-item js_contact_us_close" href="#">
302 <div class="contact-us-item__icon"> 306 <div class="contact-us-item__icon">
303 <svg width="44" height="44"> 307 <svg width="44" height="44">
304 <use xlink:href="images/sprite.svg#contact-us-email"></use> 308 <use xlink:href="images/sprite.svg#contact-us-email"></use>
305 </svg> 309 </svg>
306 </div> 310 </div>
307 <div class="contact-us-item__name">Написать</div></a><a class="contact-us-item js_contact_us_close" href="#"> 311 <div class="contact-us-item__name">Написать</div></a><a class="contact-us-item js_contact_us_close" href="#">
308 <div class="contact-us-item__icon"> 312 <div class="contact-us-item__icon">
309 <svg width="34" height="34"> 313 <svg width="34" height="34">
310 <use xlink:href="images/sprite.svg#contact-us-chat"></use> 314 <use xlink:href="images/sprite.svg#contact-us-chat"></use>
311 </svg> 315 </svg>
312 </div> 316 </div>
313 <div class="contact-us-item__name">Онлайн-чат</div></a></div> 317 <div class="contact-us-item__name">Онлайн-чат</div></a></div>
314 <div class="contact-us__socials"><a class="contact-us-social js_contact_us_close" href="#" target="_blank"> 318 <div class="contact-us__socials"><a class="contact-us-social js_contact_us_close" href="#" target="_blank">
315 <div class="contact-us-social__icon contact-us-social__icon-tg"><img src="images/contact-us-tg.svg" alt=""></div> 319 <div class="contact-us-social__icon contact-us-social__icon-tg"><img src="images/contact-us-tg.svg" alt=""></div>
316 <div class="contact-us-social__name">Telegram</div></a><a class="contact-us-social js_contact_us_close" href="#" target="_blank"> 320 <div class="contact-us-social__name">Telegram</div></a><a class="contact-us-social js_contact_us_close" href="#" target="_blank">
317 <div class="contact-us-social__icon contact-us-social__icon-wa"> 321 <div class="contact-us-social__icon contact-us-social__icon-wa">
318 <svg width="31" height="31"> 322 <svg width="31" height="31">
319 <use xlink:href="images/sprite.svg#contact-us-wa"></use> 323 <use xlink:href="images/sprite.svg#contact-us-wa"></use>
320 </svg> 324 </svg>
321 </div> 325 </div>
322 <div class="contact-us-social__name">WhatsApp</div></a></div> 326 <div class="contact-us-social__name">WhatsApp</div></a></div>
323 </div> 327 </div>
324 </div> 328 </div>
325 <div class="offer-side-popup" data-popup="offer-side-popup"> 329 <div class="offer-side-popup" data-popup="offer-side-popup">
326 <div class="offer-side-popup__wrap"> 330 <div class="offer-side-popup__wrap">
327 <button class="offer-side-popup__close js_popup_close" type="button"> 331 <button class="offer-side-popup__close js_popup_close" type="button">
328 <svg width="20" height="20"> 332 <svg width="20" height="20">
329 <use xlink:href="images/sprite.svg#popup-close"></use> 333 <use xlink:href="images/sprite.svg#popup-close"></use>
330 </svg> 334 </svg>
331 </button> 335 </button>
332 <div class="offer-side-popup__cnt"> 336 <div class="offer-side-popup__cnt">
333 <div class="offer-side-popup__item js_offer_side_popup_item active" data-item="1"><img src="images/offer-side-item-img-1.jpg" alt="План объекта"></div> 337 <div class="offer-side-popup__item js_offer_side_popup_item active" data-item="1"><img src="images/offer-side-item-img-1.jpg" alt="План объекта"></div>
334 <div class="offer-side-popup__item js_offer_side_popup_item" data-item="2"><img src="images/offer-side-item-img-2.jpg" alt="План этажа"></div> 338 <div class="offer-side-popup__item js_offer_side_popup_item" data-item="2"><img src="images/offer-side-item-img-2.jpg" alt="План этажа"></div>
335 </div> 339 </div>
336 <div class="offer-side-popup__tabs"> 340 <div class="offer-side-popup__tabs">
337 <button class="offer-side-popup__tab js_offer_side_popup_tab active" type="button" data-tab="1">План объекта</button> 341 <button class="offer-side-popup__tab js_offer_side_popup_tab active" type="button" data-tab="1">План объекта</button>
338 <button class="offer-side-popup__tab js_offer_side_popup_tab" type="button" data-tab="2">План этажа</button> 342 <button class="offer-side-popup__tab js_offer_side_popup_tab" type="button" data-tab="2">План этажа</button>
339 </div> 343 </div>
340 <button class="offer-side-popup__sizeoff js_popup_close" type="button"> 344 <button class="offer-side-popup__sizeoff js_popup_close" type="button">
341 <svg width="18" height="18"> 345 <svg width="18" height="18">
342 <use xlink:href="images/sprite.svg#popup-sizeoff"></use> 346 <use xlink:href="images/sprite.svg#popup-sizeoff"></use>
343 </svg> 347 </svg>
344 </button> 348 </button>
345 </div> 349 </div>
346 </div> 350 </div>
347 <div class="img-viewer js_img_viewer"> 351 <div class="img-viewer js_img_viewer">
348 <div class="img-viewer__wrap"> 352 <div class="img-viewer__wrap">
349 <button class="img-viewer__close js_img_viewer_close" type="button"> 353 <button class="img-viewer__close js_img_viewer_close" type="button">
350 <svg width="20" height="20"> 354 <svg width="20" height="20">
351 <use xlink:href="images/sprite.svg#popup-close"></use> 355 <use xlink:href="images/sprite.svg#popup-close"></use>
352 </svg> 356 </svg>
353 </button> 357 </button>
354 <div class="img-viewer__thumbs js_img_viewer_thumbs"> 358 <div class="img-viewer__thumbs js_img_viewer_thumbs">
355 <div class="img-viewer__thumbs-swiper js_img_viewer_thumbs_swiper swiper"> 359 <div class="img-viewer__thumbs-swiper js_img_viewer_thumbs_swiper swiper">
356 <div class="swiper-wrapper"></div> 360 <div class="swiper-wrapper"></div>
357 </div> 361 </div>
358 </div> 362 </div>
359 <div class="img-viewer__slider"> 363 <div class="img-viewer__slider">
360 <div class="img-viewer__slider-swiper js_img_viewer_slider_swiper swiper"> 364 <div class="img-viewer__slider-swiper js_img_viewer_slider_swiper swiper">
361 <div class="swiper-wrapper"></div> 365 <div class="swiper-wrapper"></div>
362 </div> 366 </div>
363 <div class="swiper-button-prev"> 367 <div class="swiper-button-prev">
364 <svg width="10" height="17"> 368 <svg width="10" height="17">
365 <use xlink:href="images/sprite.svg#slider-arrow"></use> 369 <use xlink:href="images/sprite.svg#slider-arrow"></use>
366 </svg> 370 </svg>
367 </div> 371 </div>
368 <div class="swiper-button-next"> 372 <div class="swiper-button-next">
369 <svg width="10" height="17"> 373 <svg width="10" height="17">
370 <use xlink:href="images/sprite.svg#slider-arrow"></use> 374 <use xlink:href="images/sprite.svg#slider-arrow"></use>
371 </svg> 375 </svg>
372 </div> 376 </div>
373 </div> 377 </div>
374 <div class="img-viewer__caption js_img_viewer_caption"></div> 378 <div class="img-viewer__caption js_img_viewer_caption"></div>
375 <button class="img-viewer__sizeoff js_img_viewer_close" type="button"> 379 <button class="img-viewer__sizeoff js_img_viewer_close" type="button">
376 <svg width="18" height="18"> 380 <svg width="18" height="18">
377 <use xlink:href="images/sprite.svg#popup-sizeoff"></use> 381 <use xlink:href="images/sprite.svg#popup-sizeoff"></use>
378 </svg> 382 </svg>
379 </button> 383 </button>
380 </div> 384 </div>
381 </div> 385 </div>
382 <div class="cookies js_cookies"> 386 <div class="cookies js_cookies">
resources/views/part/filter/category.blade.php
1 <section class="hero hero--modified1"> 1 <section class="hero hero--modified1">
2 <div class="container"> 2 <div class="container">
3 <div class="hero__bg" style="background-image:url({{ asset('images/category-bg.jpg') }})"></div> 3 <div class="hero__bg" style="background-image:url({{ asset('images/category-bg.jpg') }})"></div>
4 <div class="hero__wrap"> 4 <div class="hero__wrap">
5 <div class="hero__inner"> 5 <div class="hero__inner">
6 <div class="breadcrumbs"> 6 <div class="breadcrumbs">
7 <ul class="breadcrumbs__list"> 7 <ul class="breadcrumbs__list">
8 <li class="breadcrumbs__item"><a class="breadcrumbs__link" href="{{ route('index') }}">Главная</a></li> 8 <li class="breadcrumbs__item"><a class="breadcrumbs__link" href="{{ route('index') }}">Главная</a></li>
9 <li class="breadcrumbs__item"><a class="breadcrumbs__link" href="{{ route('catalog') }}">Каталог</a></li> 9 <li class="breadcrumbs__item"><a class="breadcrumbs__link" href="{{ route('catalog') }}">Каталог</a></li>
10 <li class="breadcrumbs__item"><span class="breadcrumbs__link">{{ $title }}</span></li> 10 <li class="breadcrumbs__item"><span class="breadcrumbs__link">{{ $title }}</span></li>
11 </ul> 11 </ul>
12 </div> 12 </div>
13 <div class="hero__cnt"> 13 <div class="hero__cnt">
14 <h1 class="hero__title title-main">{{ $title }}</h1> 14 <h1 class="hero__title title-main">{{ $title }}</h1>
15 <p class="hero__descr">В Москве, Новой Москве и Подмосковье</p> 15 <p class="hero__descr">В Москве, Новой Москве и Подмосковье</p>
16 </div> 16 </div>
17 <div class="hero__bottom"> 17 <div class="hero__bottom">
18 <div class="hero__links"> 18 <div class="hero__links">
19 <a class="hero__link {{ (url()->current() == route('category', ['cat'=>'arenda']))? 'active' : null }}" href="{{ route('category', ['cat'=>'arenda']) }}">Аренда торговых помещениий</a> 19 <a class="hero__link {{ (url()->current() == route('category', ['cat'=>'arenda']))? 'active' : null }}" href="{{ route('category', ['cat'=>'arenda']) }}">Аренда торговых помещениий</a>
20 <a class="hero__link {{ (url()->current() == route('category', ['cat'=>'sale']))? 'active' : null }}" href="{{ route('category', ['cat'=>'sale']) }}">Продажа торговых помещений</a> 20 <a class="hero__link {{ (url()->current() == route('category', ['cat'=>'sale']))? 'active' : null }}" href="{{ route('category', ['cat'=>'sale']) }}">Продажа торговых помещений</a>
21 <a class="hero__link {{ (url()->current() == route('category', ['cat'=>'bussiness']))? 'active' : null }}" href="{{ route('category', ['cat'=>'bussiness']) }}">Арендый бизнес</a></div> 21 <a class="hero__link {{ (url()->current() == route('category', ['cat'=>'bussiness']))? 'active' : null }}" href="{{ route('category', ['cat'=>'bussiness']) }}">Арендый бизнес</a></div>
22 </div> 22 </div>
23 <form class="hero-search" action="{{ url()->current() }}" method="GET"> 23 <form class="hero-search" action="<?//=url()->current()?>" method="GET">
24 <div class="hero-search__control"> 24 <div class="hero-search__control">
25 <div class="hero-filter hero-filter--modified1 js_hero_filter"> 25 <div class="hero-filter hero-filter--modified1 js_hero_filter">
26 <input class="js_hero_filter_input" id="area" name="area" type="hidden"> 26 <input class="js_hero_filter_input" id="area" name="area" type="hidden">
27 <div class="hero-filter__current js_hero_filter_current" id="area_name" name="area_name">Все объекты</div> 27 <div class="hero-filter__current js_hero_filter_current" id="area_name" name="area_name">Все объекты</div>
28 <div class="hero-filter__dropdown js_hero_filter_dropdown"> 28 <div class="hero-filter__dropdown js_hero_filter_dropdown">
29 <ul class="hero-filter__list"> 29 <ul class="hero-filter__list">
30 <li class="hero-filter__item" data-val="0">Все объекты</li> 30 <li class="hero-filter__item" data-val="0">Все объекты</li>
31 @if ($items_area->count()) 31 @if ($items_area->count())
32 @foreach($items_area as $item_area) 32 @foreach($items_area as $item_area)
33 <li class="hero-filter__item" data-val="{{ $item_area->id }}">{{ $item_area->name_area }}</li> 33 <li class="hero-filter__item" data-val="{{ $item_area->id }}">{{ $item_area->name_area }}</li>
34 @endforeach 34 @endforeach
35 @endif 35 @endif
36 </ul> 36 </ul>
37 </div> 37 </div>
38 </div> 38 </div>
39 <div class="hero-filter hero-filter--modified2 js_hero_filter"> 39 <div class="hero-filter hero-filter--modified2 js_hero_filter">
40 <input class="js_hero_filter_input" id="type_area" name="type_area" type="hidden"> 40 <input class="js_hero_filter_input" id="type_area" name="type_area" type="hidden">
41 <div class="hero-filter__current js_hero_filter_current" id="type_area_name" name="type_area_name">Тип недвижимости</div> 41 <div class="hero-filter__current js_hero_filter_current" id="type_area_name" name="type_area_name">Тип недвижимости</div>
42 <div class="hero-filter__dropdown js_hero_filter_dropdown"> 42 <div class="hero-filter__dropdown js_hero_filter_dropdown">
43 <ul class="hero-filter__list"> 43 <ul class="hero-filter__list">
44 <li class="hero-filter__item" data-val="0">Выбрать все</li> 44 <li class="hero-filter__item" data-val="0">Выбрать все</li>
45 @if ($items_type_area->count()) 45 @if ($items_type_area->count())
46 @foreach($items_type_area as $item_type_area) 46 @foreach($items_type_area as $item_type_area)
47 <li class="hero-filter__item" data-val="{{ $item_type_area->id }}">{{ $item_type_area->name_type }}</li> 47 <li class="hero-filter__item" data-val="{{ $item_type_area->id }}">{{ $item_type_area->name_type }}</li>
48 @endforeach 48 @endforeach
49 @endif 49 @endif
50 </ul> 50 </ul>
51 </div> 51 </div>
52 </div> 52 </div>
53 <div class="hero-filter hero-filter--modified3 js_hero_filter"> 53 <div class="hero-filter hero-filter--modified3 js_hero_filter">
54 <input class="js_hero_filter_input" id="format_area" name="format_area" type="hidden"> 54 <input class="js_hero_filter_input" id="format_area" name="format_area" type="hidden">
55 <div class="hero-filter__current js_hero_filter_current" id="format_area_name" name="format_area_name">Формат недвижимости</div> 55 <div class="hero-filter__current js_hero_filter_current" id="format_area_name" name="format_area_name">Формат недвижимости</div>
56 <div class="hero-filter__dropdown js_hero_filter_dropdown"> 56 <div class="hero-filter__dropdown js_hero_filter_dropdown">
57 <ul class="hero-filter__list"> 57 <ul class="hero-filter__list">
58 <li class="hero-filter__item" data-val="0">Выбрать все</li> 58 <li class="hero-filter__item" data-val="0">Выбрать все</li>
59 @if ($items_format_area->count()) 59 @if ($items_format_area->count())
60 @foreach($items_format_area as $item_format_area) 60 @foreach($items_format_area as $item_format_area)
61 <li class="hero-filter__item" data-val="{{ $item_format_area->id }}">{{ $item_format_area->name_format }}</li> 61 <li class="hero-filter__item" data-val="{{ $item_format_area->id }}">{{ $item_format_area->name_format }}</li>
62 @endforeach 62 @endforeach
63 @endif 63 @endif
64 </ul> 64 </ul>
65 </div> 65 </div>
66 </div> 66 </div>
67 <div class="hero-filter hero-filter--modified4 js_hero_filter"> 67 <div class="hero-filter hero-filter--modified4 js_hero_filter">
68 <div class="hero-filter__current js_hero_filter_current">Площадь, м<sup>2</sup></div> 68 <div class="hero-filter__current js_hero_filter_current">Площадь, м<sup>2</sup></div>
69 <div class="hero-filter__dropdown js_hero_filter_dropdown"> 69 <div class="hero-filter__dropdown js_hero_filter_dropdown">
70 <div class="hero-filter__fields"> 70 <div class="hero-filter__fields">
71 <label class="hero-filter__field"><span>От</span> 71 <label class="hero-filter__field"><span>От</span>
72 <input class="js_hero_filter_field js_hero_filter_from" id="area_m2_min" name="area_m2_min" type="text" data-min="3" placeholder="3" value="<?if (isset($_GET['area_m2_min'])) { echo($_GET['area_m2_min']); }?>"> 72 <input class="js_hero_filter_field js_hero_filter_from" id="area_m2_min" name="area_m2_min" type="text" data-min="3" placeholder="3" value="<?if (isset($_GET['area_m2_min'])) { echo($_GET['area_m2_min']); }?>">
73 </label> 73 </label>
74 <label class="hero-filter__field"><span>До</span> 74 <label class="hero-filter__field"><span>До</span>
75 <input class="js_hero_filter_field js_hero_filter_to" id="area_m2_max" name="area_m2_max" type="text" data-max="125000" placeholder="125 000" value="<?if (isset($_GET['area_m2_max'])) { echo($_GET['area_m2_max']);}?>"> 75 <input class="js_hero_filter_field js_hero_filter_to" id="area_m2_max" name="area_m2_max" type="text" data-max="125000" placeholder="125 000" value="<?if (isset($_GET['area_m2_max'])) { echo($_GET['area_m2_max']);}?>">
76 </label> 76 </label>
77 </div> 77 </div>
78 <button class="hero-filter__reset js_hero_filter_reset" type="button">Очистить</button> 78 <button class="hero-filter__reset js_hero_filter_reset" type="button">Очистить</button>
79 </div> 79 </div>
80 </div> 80 </div>
81 <div class="hero-filter hero-filter--modified5 js_hero_filter"> 81 <div class="hero-filter hero-filter--modified5 js_hero_filter">
82 <div class="hero-filter__current js_hero_filter_current">Стоимость, ₽</div> 82 <div class="hero-filter__current js_hero_filter_current">Стоимость, ₽</div>
83 <div class="hero-filter__dropdown js_hero_filter_dropdown"> 83 <div class="hero-filter__dropdown js_hero_filter_dropdown">
84 <div class="hero-filter__fields"> 84 <div class="hero-filter__fields">
85 <label class="hero-filter__field"><span>От</span> 85 <label class="hero-filter__field"><span>От</span>
86 <input class="js_hero_filter_field js_hero_filter_from" id="price_min" name="price_min" type="text" data-min="50" placeholder="50" value="<?if (isset($_GET['price_min'])) { echo ($_GET['price_min']); } ?>"> 86 <input class="js_hero_filter_field js_hero_filter_from" id="price_min" name="price_min" type="text" data-min="50" placeholder="50" value="<?if (isset($_GET['price_min'])) { echo ($_GET['price_min']); } ?>">
87 </label> 87 </label>
88 <label class="hero-filter__field"><span>До</span> 88 <label class="hero-filter__field"><span>До</span>
89 <input class="js_hero_filter_field js_hero_filter_to" id="price_max" name="price_max" type="text" data-max="125000" placeholder="125 000" value="<?if (isset($_GET['price_max'])) { echo ($_GET['price_max']); }?>"> 89 <input class="js_hero_filter_field js_hero_filter_to" id="price_max" name="price_max" type="text" data-max="125000" placeholder="125 000" value="<?if (isset($_GET['price_max'])) { echo ($_GET['price_max']); }?>">
90 </label> 90 </label>
91 </div> 91 </div>
92 <button class="hero-filter__reset js_hero_filter_reset" type="button">Очистить</button> 92 <button class="hero-filter__reset js_hero_filter_reset" type="button">Очистить</button>
93 </div> 93 </div>
94 </div> 94 </div>
95 </div> 95 </div>
96 <div class="hero-search__bottom"> 96 <div class="hero-search__bottom">
97 <div class="hero-search__field"> 97 <div class="hero-search__field">
98 <input type="text" id="address" name="address" placeholder="Укажите метро, округ, район, улицу" value="<?if (isset($_GET['address'])) { echo ($_GET['address']); }?>"> 98 <input type="text" id="address" name="address" placeholder="Укажите метро, округ, район, улицу" value="<?if (isset($_GET['address'])) { echo ($_GET['address']); }?>">
99 <button> 99 <button>
100 <svg width="20" height="20"> 100 <svg width="20" height="20">
101 <use xlink:href="{{ asset('images/sprite.svg#hero-search') }}"> </use> 101 <use xlink:href="{{ asset('images/sprite.svg#hero-search') }}"> </use>
102 </svg> 102 </svg>
103 </button> 103 </button>
104 </div> 104 </div>
105 <div class="hero-search__buttons"> 105 <div class="hero-search__buttons">
106 <a class="hero-search__btn btn btn--white js_hero_search_btn" href="{{ route('maps') }}">Показать на карте</a> 106 <a class="hero-search__btn btn btn--white js_hero_search_btn" href="{{ route('maps') }}">Показать на карте</a>
107 <button type="submit" class="hero-search__btn btn btn--main js_hero_search_btn"> 107 <button type="submit" class="hero-search__btn btn btn--main js_hero_search_btn">
108 Искать 108 Искать
109 </button> 109 </button>
110 </div> 110 </div>
111 </div> 111 </div>
112 </form> 112 </form>
113 </div> 113 </div>
114 </div> 114 </div>
115 </div> 115 </div>
116 </div> 116 </div>
117 </section> 117 </section>
118 118
1 <?php 1 <?php
2 2
3 use Illuminate\Support\Facades\Auth; 3 use Illuminate\Support\Facades\Auth;
4 use Illuminate\Support\Facades\Route; 4 use Illuminate\Support\Facades\Route;
5 use App\Http\Controllers\MainController; 5 use App\Http\Controllers\MainController;
6 use App\Http\Controllers\RegisterController; 6 use App\Http\Controllers\RegisterController;
7 use App\Http\Controllers\LoginController; 7 use App\Http\Controllers\LoginController;
8 use App\Http\Controllers\AdminController; 8 use App\Http\Controllers\AdminController;
9 /* 9 /*
10 |-------------------------------------------------------------------------- 10 |--------------------------------------------------------------------------
11 | Web Routes 11 | Web Routes
12 |-------------------------------------------------------------------------- 12 |--------------------------------------------------------------------------
13 | 13 |
14 | Here is where you can register web routes for your application. These 14 | Here is where you can register web routes for your application. These
15 | routes are loaded by the RouteServiceProvider within a group which 15 | routes are loaded by the RouteServiceProvider within a group which
16 | contains the "web" middleware group. Now create something great! 16 | contains the "web" middleware group. Now create something great!
17 | 17 |
18 */ 18 */
19 19
20 //Главная страница 20 //Главная страница
21 Route::get('/',[MainController::class, 'index'])->name('index'); 21 Route::get('/',[MainController::class, 'index'])->name('index');
22 22
23 //Страница Избранные 23 //Страница Избранные
24 Route::get('favorite',[MainController::class, 'favorite'])->name('favorite'); 24 Route::get('favorite',[MainController::class, 'favorite'])->name('favorite');
25 25
26 //Страница контакты 26 //Страница контакты
27 Route::get('contact',[MainController::class, 'contact'])->name('contact'); 27 Route::get('contact',[MainController::class, 'contact'])->name('contact');
28 28
29 //Страница каталог 29 //Страница каталог
30 Route::get('catalog',[MainController::class, 'catalog'])->name('catalog'); 30 Route::get('catalog',[MainController::class, 'catalog'])->name('catalog');
31 31
32 //Страница новости 32 //Страница новости
33 Route::get('news',[MainController::class, 'news'])->name('news'); 33 Route::get('news',[MainController::class, 'news'])->name('news');
34 34
35 //Страница о компании 35 //Страница о компании
36 Route::get('about',[MainController::class, 'about'])->name('about'); 36 Route::get('about',[MainController::class, 'about'])->name('about');
37 37
38 //Страница объекты на карте 38 //Страница объекты на карте
39 Route::get('maps',[MainController::class, 'mapsobj'])->name('maps'); 39 Route::get('maps',[MainController::class, 'mapsobj'])->name('maps');
40 40
41 // Политика конфедициальности 41 // Политика конфедициальности
42 Route::get('conf', function () { 42 Route::get('conf', function () {
43 return view('conf'); 43 return view('conf');
44 })->name('conf'); 44 })->name('conf');
45 45
46 //Детальная страница предложения недвижимости 46 //Детальная страница предложения недвижимости
47 Route::get('offer/{house:id}', [MainController::class, 'offer'])->name('offer'); 47 Route::get('offer/{house:id}', [MainController::class, 'offer'])->name('offer');
48 48
49 //Детальная страница новостей 49 //Детальная страница новостей
50 Route::get('detail-new/{news:id}', [MainController::class, 'DetailNew'])->name('new'); 50 Route::get('detail-new/{news:id}', [MainController::class, 'DetailNew'])->name('new');
51 51
52 //Страница ЖилойКомплекс 52 //Страница ЖилойКомплекс
53 Route::get('complex/{area:id}', [MainController::class, 'complex'])->name('complex'); 53 Route::get('complex/{area:id}', [MainController::class, 'complex'])->name('complex');
54 54
55 // ajax-фильтры каталога 55 // ajax-фильтры каталога
56 Route::get('catalog_ajax_filter', [MainController::class, 'catalog_ajax_filter'])->name('catalog_ajax_filter'); 56 Route::get('catalog_ajax_filter', [MainController::class, 'catalog_ajax_filter'])->name('catalog_ajax_filter');
57 57
58 //Категория 58 //Категория
59 Route::get('category/{cat}', [MainController::class, 'Category'])->name('category'); 59 Route::get('category/{cat}', [MainController::class, 'Category'])->name('category');
60 60
61 //Категория ajax
62 Route::get('category_ajax/{cat}', [MainController::class, 'category_ajax'])->name('category_ajax');
63
61 64
62 Route::group([ 65 Route::group([
63 'as' => 'auth.', // имя маршрута, например auth.index 66 'as' => 'auth.', // имя маршрута, например auth.index
64 'prefix' => 'auth', // префикс маршрута, например auth/index 67 'prefix' => 'auth', // префикс маршрута, например auth/index
65 ], function () { 68 ], function () {
66 // Форма регистрации 69 // Форма регистрации
67 Route::get('register', [RegisterController::class, 'register'])->name('register'); 70 Route::get('register', [RegisterController::class, 'register'])->name('register');
68 71
69 // Создание пользователя 72 // Создание пользователя
70 Route::post('register', [RegisterController::class, 'create'])->name('create'); 73 Route::post('register', [RegisterController::class, 'create'])->name('create');
71 //Форма входа 74 //Форма входа
72 Route::get('login', [LoginController::class, 'login'])->name('login'); 75 Route::get('login', [LoginController::class, 'login'])->name('login');
73 76
74 // аутентификация 77 // аутентификация
75 Route::post('login', [LoginController::class, 'autenticate'])->name('auth'); 78 Route::post('login', [LoginController::class, 'autenticate'])->name('auth');
76 79
77 // выход 80 // выход
78 Route::get('logout', [LoginController::class, 'logout'])->name('logout'); 81 Route::get('logout', [LoginController::class, 'logout'])->name('logout');
79 }); 82 });
80 83
81 /* 84 /*
82 * Личный кабинет пользователя 85 * Личный кабинет пользователя
83 */ 86 */
84 Route::group([ 87 Route::group([
85 'as' => 'user.', // имя маршрута, например user.index 88 'as' => 'user.', // имя маршрута, например user.index
86 'prefix' => 'user', // префикс маршрута, например user/index 89 'prefix' => 'user', // префикс маршрута, например user/index
87 //'namespace' => 'User', // пространство имен контроллеров 90 //'namespace' => 'User', // пространство имен контроллеров
88 'middleware' => ['auth'] // один или несколько посредников 91 'middleware' => ['auth'] // один или несколько посредников
89 ], function () { 92 ], function () {
90 // главная страница 93 // главная страница
91 Route::get('index', [AdminController::class, 'index'])->name('index'); 94 Route::get('index', [AdminController::class, 'index'])->name('index');
92 }); 95 });
93 96