Commit 3575d19ae609a1347c12388accf62c076f9efcea
1 parent
7c115bff1b
Exists in
master
Админка новости и страница компании
Showing 21 changed files with 1117 additions and 14 deletions Inline Diff
- app/Http/Controllers/Admin/AreaController.php
- app/Http/Controllers/Admin/CompanyAreaController.php
- app/Http/Controllers/Admin/FormatAreaController.php
- app/Http/Controllers/Admin/HousesController.php
- app/Http/Controllers/Admin/MessageAreaController.php
- app/Http/Controllers/Admin/NewsController.php
- app/Http/Controllers/Admin/TypeAreaController.php
- app/Models/News.php
- database/migrations/2023_03_01_073041_create_news_table.php
- database/migrations/2023_03_01_073135_create_contacts_table.php
- resources/views/admin/area/add_img.blade.php
- resources/views/admin/area/edit.blade.php
- resources/views/admin/company/edit.blade.php
- resources/views/admin/company/view.blade.php
- resources/views/admin/news/create.blade.php
- resources/views/admin/news/edit.blade.php
- resources/views/admin/news/form.blade.php
- resources/views/admin/news/index.blade.php
- resources/views/admin/news/view.blade.php
- resources/views/layout/admin.blade.php
- routes/web.php
app/Http/Controllers/Admin/AreaController.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Http\Controllers\Admin; | 3 | namespace App\Http\Controllers\Admin; |
4 | 4 | ||
5 | use App\Http\Controllers\Controller; | 5 | use App\Http\Controllers\Controller; |
6 | use App\Http\Requests\AreasRequest; | 6 | use App\Http\Requests\AreasRequest; |
7 | use App\Models\Area; | 7 | use App\Models\Area; |
8 | use App\Models\foto_area; | ||
8 | use Illuminate\Http\Request; | 9 | use Illuminate\Http\Request; |
10 | use Illuminate\Support\Facades\Session; | ||
9 | use Illuminate\Support\Facades\Storage; | 11 | use Illuminate\Support\Facades\Storage; |
12 | use Illuminate\Support\Facades\Validator; | ||
10 | 13 | ||
11 | class AreaController extends Controller | 14 | class AreaController extends Controller |
12 | { | 15 | { |
13 | /** | 16 | /** |
14 | * Display a listing of the resource. | 17 | * Display a listing of the resource. |
15 | * | 18 | * |
16 | * @return \Illuminate\Http\Response | 19 | * @return \Illuminate\Http\Response |
17 | */ | 20 | */ |
18 | public function index() | 21 | public function index() |
19 | { | 22 | { |
20 | $areas = Area::query()->orderByDesc('created_at')->paginate(5); | 23 | $areas = Area::query()->orderByDesc('created_at')->orderByDesc('id')->paginate(5); |
21 | return view('admin.area.index', compact('areas')); | 24 | return view('admin.area.index', compact('areas')); |
22 | } | 25 | } |
23 | 26 | ||
24 | /** | 27 | /** |
25 | * Show the form for creating a new resource. | 28 | * Show the form for creating a new resource. |
26 | * Форма создания объекта | 29 | * Форма создания объекта |
27 | * @return \Illuminate\Http\Response | 30 | * @return \Illuminate\Http\Response |
28 | */ | 31 | */ |
29 | public function create() | 32 | public function create() |
30 | { | 33 | { |
31 | return view('admin.area.create'); | 34 | return view('admin.area.create'); |
32 | } | 35 | } |
33 | 36 | ||
37 | /** | ||
38 | * Форма дополнительных картинок объекта | ||
39 | */ | ||
40 | public function area_category(Area $area) { | ||
41 | return view('admin.area.add_img', compact('area')); | ||
42 | } | ||
43 | |||
44 | /** | ||
45 | * Сохранение дополнительных картинок объекта | ||
46 | */ | ||
47 | public function area_add_img(Area $area, Request $request) { | ||
48 | $rules = [ | ||
49 | 'foto' => 'required|min:3|max:255', | ||
50 | ]; | ||
51 | $messages = [ | ||
52 | 'required' => 'Укажите картинку!', | ||
53 | ]; | ||
54 | $validator = Validator::make($request->all(), $rules, $messages); | ||
55 | |||
56 | if ($validator->fails()) { | ||
57 | return redirect()->route('admin.img.area', ['area' => $area->id]) | ||
58 | ->withErrors($validator); | ||
59 | } else { | ||
60 | //$area->fotos()->create($request); | ||
61 | $foto_area = new foto_area(); | ||
62 | $foto_area->area_id = $area->id; | ||
63 | $foto_area->foto = $request->file('foto')->store('areas', 'public'); | ||
34 | 64 | ||
35 | public function area_category() { | 65 | $foto_area->save(); |
66 | //$area->fotos()->save($foto_area); | ||
67 | return redirect()->route('admin.area.edit', ['area' => $area->id]); | ||
68 | } | ||
69 | } | ||
36 | 70 | ||
71 | /** | ||
72 | * Удаление дополнительных картинок объектов недвижимости | ||
73 | * @param $id | ||
74 | * @param Area $area | ||
75 | */ | ||
76 | public function area_del_img($id, Area $area) { | ||
77 | if (!empty($id)) { | ||
78 | $id = (int)$id; | ||
79 | $item = foto_area::find($id); | ||
80 | Storage::delete($item->foto); | ||
81 | $item->delete(); | ||
82 | Session::flash('message','Картинка была успешно удалена!'); | ||
83 | |||
84 | return redirect()->route('admin.area.edit', ['area' => $area->id]); | ||
85 | |||
86 | } else { | ||
87 | return redirect()->route('admin.area.edit', ['area' => $area->id]); | ||
88 | } | ||
37 | } | 89 | } |
38 | 90 | ||
39 | /** | 91 | /** |
40 | * Store a newly created resource in storage. | 92 | * Store a newly created resource in storage. |
41 | * | 93 | * |
42 | * @param \Illuminate\Http\Request $request | 94 | * @param \Illuminate\Http\Request $request |
43 | * @return \Illuminate\Http\Response | 95 | * @return \Illuminate\Http\Response |
44 | */ | 96 | */ |
45 | public function store(AreasRequest $request) | 97 | public function store(AreasRequest $request) |
46 | { | 98 | { |
47 | $params = $request->all(); | 99 | $params = $request->all(); |
48 | //unset($params['foto_main']); | 100 | //unset($params['foto_main']); |
49 | 101 | ||
50 | if ($request->has('foto_main')) { | 102 | if ($request->has('foto_main')) { |
51 | $params['foto_main'] = $request->file('foto_main')->store('areas', 'public'); | 103 | $params['foto_main'] = $request->file('foto_main')->store('areas', 'public'); |
52 | } | 104 | } |
53 | 105 | ||
54 | Area::create($params); | 106 | Area::create($params); |
55 | return redirect()->route('admin.area.index'); | 107 | return redirect()->route('admin.area.index'); |
56 | } | 108 | } |
57 | 109 | ||
58 | /** | 110 | /** |
59 | * Display the specified resource. | 111 | * Display the specified resource. |
60 | * Просмотр объекта недвижимости | 112 | * Просмотр объекта недвижимости |
61 | * @param \App\Models\Area $area | 113 | * @param \App\Models\Area $area |
62 | * @return \Illuminate\Http\Response | 114 | * @return \Illuminate\Http\Response |
63 | */ | 115 | */ |
64 | public function show(Area $area) | 116 | public function show(Area $area) |
65 | { | 117 | { |
66 | return view('admin.area.view', compact('area')); | 118 | return view('admin.area.view', compact('area')); |
67 | } | 119 | } |
68 | 120 | ||
69 | /** | 121 | /** |
70 | * Show the form for editing the specified resource. | 122 | * Show the form for editing the specified resource. |
71 | * Форма редактирования объекта | 123 | * Форма редактирования объекта |
72 | * @param \App\Models\Area $area | 124 | * @param \App\Models\Area $area |
73 | * @return \Illuminate\Http\Response | 125 | * @return \Illuminate\Http\Response |
74 | */ | 126 | */ |
75 | public function edit(Area $area) | 127 | public function edit(Area $area) |
76 | { | 128 | { |
77 | return view('admin.area.edit', compact('area')); | 129 | return view('admin.area.edit', compact('area')); |
78 | } | 130 | } |
79 | 131 | ||
80 | /** | 132 | /** |
81 | * Update the specified resource in storage. | 133 | * Update the specified resource in storage. |
82 | * Обновление-сохранение объекта недвижимости | 134 | * Обновление-сохранение объекта недвижимости |
83 | * @param \Illuminate\Http\Request $request | 135 | * @param \Illuminate\Http\Request $request |
84 | * @param \App\Models\Area $area | 136 | * @param \App\Models\Area $area |
85 | * @return \Illuminate\Http\Response | 137 | * @return \Illuminate\Http\Response |
86 | */ | 138 | */ |
87 | public function update(AreasRequest $request, Area $area) | 139 | public function update(AreasRequest $request, Area $area) |
88 | { | 140 | { |
89 | $params = $request->all(); | 141 | $params = $request->all(); |
90 | unset($params['foto_main']); | 142 | unset($params['foto_main']); |
91 | if ($request->has('foto_main')) { | 143 | if ($request->has('foto_main')) { |
92 | Storage::delete($area->foto_main); | 144 | Storage::delete($area->foto_main); |
93 | $params['foto_main'] = $request->file('foto_main')->store('areas', 'public'); | 145 | $params['foto_main'] = $request->file('foto_main')->store('areas', 'public'); |
94 | } | 146 | } |
95 | 147 | ||
96 | $area->update($params); | 148 | $area->update($params); |
97 | return redirect()->route('admin.area.index'); | 149 | return redirect()->route('admin.area.index'); |
98 | } | 150 | } |
99 | 151 | ||
100 | /** | 152 | /** |
101 | * Remove the specified resource from storage. | 153 | * Remove the specified resource from storage. |
102 | * Удаление объекта недвижимости | 154 | * Удаление объекта недвижимости |
103 | * @param \App\Models\Area $area | 155 | * @param \App\Models\Area $area |
104 | * @return \Illuminate\Http\Response | 156 | * @return \Illuminate\Http\Response |
105 | */ | 157 | */ |
106 | public function destroy(Area $area) | 158 | public function destroy(Area $area) |
107 | { | 159 | { |
108 | if (!empty($area->foto_main)) { | 160 | if (!empty($area->foto_main)) { |
109 | Storage::delete($area->foto_main); | 161 | Storage::delete($area->foto_main); |
110 | } | 162 | } |
111 | $area->delete(); | 163 | $area->delete(); |
112 | return redirect()->route('admin.area.index'); | 164 | return redirect()->route('admin.area.index'); |
113 | } | 165 | } |
114 | } | 166 | } |
115 | 167 |
app/Http/Controllers/Admin/CompanyAreaController.php
File was created | 1 | <?php | |
2 | |||
3 | namespace App\Http\Controllers\Admin; | ||
4 | |||
5 | use App\Http\Controllers\Controller; | ||
6 | use App\Models\Contact; | ||
7 | use Illuminate\Http\Request; | ||
8 | use Illuminate\Support\Facades\Validator; | ||
9 | |||
10 | class CompanyAreaController extends Controller | ||
11 | { | ||
12 | /** | ||
13 | * Display a listing of the resource. | ||
14 | * | ||
15 | * @return \Illuminate\Http\Response | ||
16 | */ | ||
17 | public function index() | ||
18 | { | ||
19 | // | ||
20 | } | ||
21 | |||
22 | /** | ||
23 | * Show the form for creating a new resource. | ||
24 | * | ||
25 | * @return \Illuminate\Http\Response | ||
26 | */ | ||
27 | public function create() | ||
28 | { | ||
29 | // | ||
30 | } | ||
31 | |||
32 | /** | ||
33 | * Store a newly created resource in storage. | ||
34 | * | ||
35 | * @param \Illuminate\Http\Request $request | ||
36 | * @return \Illuminate\Http\Response | ||
37 | */ | ||
38 | public function store(Request $request) | ||
39 | { | ||
40 | // | ||
41 | } | ||
42 | |||
43 | /** | ||
44 | * Display the specified resource. | ||
45 | * | ||
46 | * @param \App\Models\Contact $contact | ||
47 | * @return \Illuminate\Http\Response | ||
48 | */ | ||
49 | public function show(Contact $contact) | ||
50 | { | ||
51 | $firm_data = Contact::find(1); | ||
52 | return view('admin.company.view', compact('firm_data')); | ||
53 | } | ||
54 | |||
55 | /** | ||
56 | * Show the form for editing the specified resource. | ||
57 | * | ||
58 | * @param \App\Models\Contact $contact | ||
59 | * @return \Illuminate\Http\Response | ||
60 | */ | ||
61 | public function edit(Contact $contact) | ||
62 | { | ||
63 | $firm_data = Contact::find(1); | ||
64 | return view('admin.company.edit', compact('firm_data')); | ||
65 | } | ||
66 | |||
67 | /** | ||
68 | * Update the specified resource in storage. | ||
69 | * | ||
70 | * @param \Illuminate\Http\Request $request | ||
71 | * @param \App\Models\Contact $contact | ||
72 | * @return \Illuminate\Http\Response | ||
73 | */ | ||
74 | public function update(Request $request, Contact $contact) | ||
75 | { | ||
76 | $rules = [ | ||
77 | 'email' => 'required|min:3|max:255', | ||
78 | 'telephone' => 'required|min:3|max:255', | ||
79 | ]; | ||
80 | $messages = [ | ||
81 | 'required' => 'Укажите обязательное поле', | ||
82 | ]; | ||
83 | |||
84 | $validator = Validator::make($request->all(), $rules, $messages); | ||
85 | |||
86 | if ($validator->fails()) { | ||
87 | return redirect()->route('admin.company.edit', ['company' => 1]) | ||
88 | ->withErrors($validator); | ||
89 | } else { | ||
90 | $params = $request->all(); | ||
91 | $contact->update($params); | ||
92 | return redirect()->route('admin.company.show', ['company' => 1]); | ||
93 | } | ||
94 | } | ||
95 | |||
96 | /** | ||
97 | * Remove the specified resource from storage. | ||
98 | * | ||
99 | * @param \App\Models\Contact $contact | ||
100 | * @return \Illuminate\Http\Response | ||
101 | */ | ||
102 | public function destroy(Contact $contact) | ||
103 | { | ||
104 | // | ||
105 | } | ||
106 | } | ||
107 |
app/Http/Controllers/Admin/FormatAreaController.php
File was created | 1 | <?php | |
2 | |||
3 | namespace App\Http\Controllers\Admin; | ||
4 | |||
5 | use App\Http\Controllers\Controller; | ||
6 | use App\Models\format_area; | ||
7 | use Illuminate\Http\Request; | ||
8 | |||
9 | class FormatAreaController extends Controller | ||
10 | { | ||
11 | /** | ||
12 | * Display a listing of the resource. | ||
13 | * | ||
14 | * @return \Illuminate\Http\Response | ||
15 | */ | ||
16 | public function index() | ||
17 | { | ||
18 | // | ||
19 | } | ||
20 | |||
21 | /** | ||
22 | * Show the form for creating a new resource. | ||
23 | * | ||
24 | * @return \Illuminate\Http\Response | ||
25 | */ | ||
26 | public function create() | ||
27 | { | ||
28 | // | ||
29 | } | ||
30 | |||
31 | /** | ||
32 | * Store a newly created resource in storage. | ||
33 | * | ||
34 | * @param \Illuminate\Http\Request $request | ||
35 | * @return \Illuminate\Http\Response | ||
36 | */ | ||
37 | public function store(Request $request) | ||
38 | { | ||
39 | // | ||
40 | } | ||
41 | |||
42 | /** | ||
43 | * Display the specified resource. | ||
44 | * | ||
45 | * @param \App\Models\format_area $format_area | ||
46 | * @return \Illuminate\Http\Response | ||
47 | */ | ||
48 | public function show(format_area $format_area) | ||
49 | { | ||
50 | // | ||
51 | } | ||
52 | |||
53 | /** | ||
54 | * Show the form for editing the specified resource. | ||
55 | * | ||
56 | * @param \App\Models\format_area $format_area | ||
57 | * @return \Illuminate\Http\Response | ||
58 | */ | ||
59 | public function edit(format_area $format_area) | ||
60 | { | ||
61 | // | ||
62 | } | ||
63 | |||
64 | /** | ||
65 | * Update the specified resource in storage. | ||
66 | * | ||
67 | * @param \Illuminate\Http\Request $request | ||
68 | * @param \App\Models\format_area $format_area | ||
69 | * @return \Illuminate\Http\Response | ||
70 | */ | ||
71 | public function update(Request $request, format_area $format_area) | ||
72 | { | ||
73 | // | ||
74 | } | ||
75 | |||
76 | /** | ||
77 | * Remove the specified resource from storage. | ||
78 | * | ||
79 | * @param \App\Models\format_area $format_area | ||
80 | * @return \Illuminate\Http\Response | ||
81 | */ | ||
82 | public function destroy(format_area $format_area) | ||
83 | { | ||
84 | // | ||
85 | } | ||
86 | } | ||
87 |
app/Http/Controllers/Admin/HousesController.php
File was created | 1 | <?php | |
2 | |||
3 | namespace App\Http\Controllers\Admin; | ||
4 | |||
5 | use App\Http\Controllers\Controller; | ||
6 | use App\Models\House; | ||
7 | use Illuminate\Http\Request; | ||
8 | |||
9 | class HousesController extends Controller | ||
10 | { | ||
11 | /** | ||
12 | * Display a listing of the resource. | ||
13 | * | ||
14 | * @return \Illuminate\Http\Response | ||
15 | */ | ||
16 | public function index() | ||
17 | { | ||
18 | // | ||
19 | } | ||
20 | |||
21 | /** | ||
22 | * Show the form for creating a new resource. | ||
23 | * | ||
24 | * @return \Illuminate\Http\Response | ||
25 | */ | ||
26 | public function create() | ||
27 | { | ||
28 | // | ||
29 | } | ||
30 | |||
31 | /** | ||
32 | * Store a newly created resource in storage. | ||
33 | * | ||
34 | * @param \Illuminate\Http\Request $request | ||
35 | * @return \Illuminate\Http\Response | ||
36 | */ | ||
37 | public function store(Request $request) | ||
38 | { | ||
39 | // | ||
40 | } | ||
41 | |||
42 | /** | ||
43 | * Display the specified resource. | ||
44 | * | ||
45 | * @param \App\Models\House $house | ||
46 | * @return \Illuminate\Http\Response | ||
47 | */ | ||
48 | public function show(House $house) | ||
49 | { | ||
50 | // | ||
51 | } | ||
52 | |||
53 | /** | ||
54 | * Show the form for editing the specified resource. | ||
55 | * | ||
56 | * @param \App\Models\House $house | ||
57 | * @return \Illuminate\Http\Response | ||
58 | */ | ||
59 | public function edit(House $house) | ||
60 | { | ||
61 | // | ||
62 | } | ||
63 | |||
64 | /** | ||
65 | * Update the specified resource in storage. | ||
66 | * | ||
67 | * @param \Illuminate\Http\Request $request | ||
68 | * @param \App\Models\House $house | ||
69 | * @return \Illuminate\Http\Response | ||
70 | */ | ||
71 | public function update(Request $request, House $house) | ||
72 | { | ||
73 | // | ||
74 | } | ||
75 | |||
76 | /** | ||
77 | * Remove the specified resource from storage. | ||
78 | * | ||
79 | * @param \App\Models\House $house | ||
80 | * @return \Illuminate\Http\Response | ||
81 | */ | ||
82 | public function destroy(House $house) | ||
83 | { | ||
84 | // | ||
85 | } | ||
86 | } | ||
87 |
app/Http/Controllers/Admin/MessageAreaController.php
File was created | 1 | <?php | |
2 | |||
3 | namespace App\Http\Controllers\Admin; | ||
4 | |||
5 | use App\Http\Controllers\Controller; | ||
6 | use App\Models\ModelMailFeedback; | ||
7 | use Illuminate\Http\Request; | ||
8 | |||
9 | class MessageAreaController extends Controller | ||
10 | { | ||
11 | /** | ||
12 | * Display a listing of the resource. | ||
13 | * | ||
14 | * @return \Illuminate\Http\Response | ||
15 | */ | ||
16 | public function index() | ||
17 | { | ||
18 | // | ||
19 | } | ||
20 | |||
21 | /** | ||
22 | * Show the form for creating a new resource. | ||
23 | * | ||
24 | * @return \Illuminate\Http\Response | ||
25 | */ | ||
26 | public function create() | ||
27 | { | ||
28 | // | ||
29 | } | ||
30 | |||
31 | /** | ||
32 | * Store a newly created resource in storage. | ||
33 | * | ||
34 | * @param \Illuminate\Http\Request $request | ||
35 | * @return \Illuminate\Http\Response | ||
36 | */ | ||
37 | public function store(Request $request) | ||
38 | { | ||
39 | // | ||
40 | } | ||
41 | |||
42 | /** | ||
43 | * Display the specified resource. | ||
44 | * | ||
45 | * @param \App\Models\ModelMailFeedback $modelMailFeedback | ||
46 | * @return \Illuminate\Http\Response | ||
47 | */ | ||
48 | public function show(ModelMailFeedback $modelMailFeedback) | ||
49 | { | ||
50 | // | ||
51 | } | ||
52 | |||
53 | /** | ||
54 | * Show the form for editing the specified resource. | ||
55 | * | ||
56 | * @param \App\Models\ModelMailFeedback $modelMailFeedback | ||
57 | * @return \Illuminate\Http\Response | ||
58 | */ | ||
59 | public function edit(ModelMailFeedback $modelMailFeedback) | ||
60 | { | ||
61 | // | ||
62 | } | ||
63 | |||
64 | /** | ||
65 | * Update the specified resource in storage. | ||
66 | * | ||
67 | * @param \Illuminate\Http\Request $request | ||
68 | * @param \App\Models\ModelMailFeedback $modelMailFeedback | ||
69 | * @return \Illuminate\Http\Response | ||
70 | */ | ||
71 | public function update(Request $request, ModelMailFeedback $modelMailFeedback) | ||
72 | { | ||
73 | // | ||
74 | } | ||
75 | |||
76 | /** | ||
77 | * Remove the specified resource from storage. | ||
78 | * | ||
79 | * @param \App\Models\ModelMailFeedback $modelMailFeedback | ||
80 | * @return \Illuminate\Http\Response | ||
81 | */ | ||
82 | public function destroy(ModelMailFeedback $modelMailFeedback) | ||
83 | { | ||
84 | // | ||
85 | } | ||
86 | } | ||
87 |
app/Http/Controllers/Admin/NewsController.php
File was created | 1 | <?php | |
2 | |||
3 | namespace App\Http\Controllers\Admin; | ||
4 | |||
5 | use App\Http\Controllers\Controller; | ||
6 | use App\Models\News; | ||
7 | use Illuminate\Http\Request; | ||
8 | use Illuminate\Support\Facades\Storage; | ||
9 | |||
10 | class NewsController extends Controller | ||
11 | { | ||
12 | /** | ||
13 | * Display a listing of the resource. | ||
14 | * | ||
15 | * @return \Illuminate\Http\Response | ||
16 | */ | ||
17 | public function index() | ||
18 | { | ||
19 | $news = News::query()->orderByDesc('created_at')->orderByDesc('id')->paginate(5); | ||
20 | return view('admin.news.index', compact('news')); | ||
21 | } | ||
22 | |||
23 | /** | ||
24 | * Show the form for creating a new resource. | ||
25 | * | ||
26 | * @return \Illuminate\Http\Response | ||
27 | */ | ||
28 | public function create() | ||
29 | { | ||
30 | return view('admin.news.create'); | ||
31 | } | ||
32 | |||
33 | /** | ||
34 | * Store a newly created resource in storage. | ||
35 | * | ||
36 | * @param \Illuminate\Http\Request $request | ||
37 | * @return \Illuminate\Http\Response | ||
38 | */ | ||
39 | public function store(Request $request) | ||
40 | { | ||
41 | $params = $request->all(); | ||
42 | unset($params['foto']); | ||
43 | |||
44 | if ($request->has('foto')) { | ||
45 | $params['foto'] = $request->file('foto')->store('news', 'public'); | ||
46 | } | ||
47 | |||
48 | News::create($params); | ||
49 | return redirect()->route('admin.news.index'); | ||
50 | } | ||
51 | |||
52 | /** | ||
53 | * Display the specified resource. | ||
54 | * | ||
55 | * @param \App\Models\News $news | ||
56 | * @return \Illuminate\Http\Response | ||
57 | */ | ||
58 | public function show(News $news) | ||
59 | { | ||
60 | return view('admin.news.view', compact('news')); | ||
61 | } | ||
62 | |||
63 | /** | ||
64 | * Show the form for editing the specified resource. | ||
65 | * | ||
66 | * @param \App\Models\News $news | ||
67 | * @return \Illuminate\Http\Response | ||
68 | */ | ||
69 | public function edit(News $news) | ||
70 | { | ||
71 | return view('admin.news.edit', compact('news')); | ||
72 | } | ||
73 | |||
74 | /** | ||
75 | * Update the specified resource in storage. | ||
76 | * | ||
77 | * @param \Illuminate\Http\Request $request | ||
78 | * @param \App\Models\News $news | ||
79 | * @return \Illuminate\Http\Response | ||
80 | */ | ||
81 | public function update(Request $request, News $news) | ||
82 | { | ||
83 | $params = $request->all(); | ||
84 | unset($params['foto']); | ||
85 | if ($request->has('foto')) { | ||
86 | Storage::delete($news->foto); | ||
87 | $params['foto'] = $request->file('foto')->store('news', 'public'); | ||
88 | } | ||
89 | |||
90 | $news->update($params); | ||
91 | return redirect()->route('admin.news.index'); | ||
92 | } | ||
93 | |||
94 | /** | ||
95 | * Remove the specified resource from storage. | ||
96 | * | ||
97 | * @param \App\Models\News $news | ||
98 | * @return \Illuminate\Http\Response | ||
99 | */ | ||
100 | public function destroy(News $news) | ||
101 | { | ||
102 | if (!empty($news->foto)) { | ||
103 | Storage::delete($news->foto); | ||
104 | } | ||
105 | $news->delete(); | ||
106 | return redirect()->route('admin.news.index'); | ||
107 | } | ||
108 | } | ||
109 |
app/Http/Controllers/Admin/TypeAreaController.php
File was created | 1 | <?php | |
2 | |||
3 | namespace App\Http\Controllers\Admin; | ||
4 | |||
5 | use App\Http\Controllers\Controller; | ||
6 | use App\Models\type_area; | ||
7 | use Illuminate\Http\Request; | ||
8 | |||
9 | class TypeAreaController extends Controller | ||
10 | { | ||
11 | /** | ||
12 | * Display a listing of the resource. | ||
13 | * | ||
14 | * @return \Illuminate\Http\Response | ||
15 | */ | ||
16 | public function index() | ||
17 | { | ||
18 | // | ||
19 | } | ||
20 | |||
21 | /** | ||
22 | * Show the form for creating a new resource. | ||
23 | * | ||
24 | * @return \Illuminate\Http\Response | ||
25 | */ | ||
26 | public function create() | ||
27 | { | ||
28 | // | ||
29 | } | ||
30 | |||
31 | /** | ||
32 | * Store a newly created resource in storage. | ||
33 | * | ||
34 | * @param \Illuminate\Http\Request $request | ||
35 | * @return \Illuminate\Http\Response | ||
36 | */ | ||
37 | public function store(Request $request) | ||
38 | { | ||
39 | // | ||
40 | } | ||
41 | |||
42 | /** | ||
43 | * Display the specified resource. | ||
44 | * | ||
45 | * @param \App\Models\type_area $type_area | ||
46 | * @return \Illuminate\Http\Response | ||
47 | */ | ||
48 | public function show(type_area $type_area) | ||
49 | { | ||
50 | // | ||
51 | } | ||
52 | |||
53 | /** | ||
54 | * Show the form for editing the specified resource. | ||
55 | * | ||
56 | * @param \App\Models\type_area $type_area | ||
57 | * @return \Illuminate\Http\Response | ||
58 | */ | ||
59 | public function edit(type_area $type_area) | ||
60 | { | ||
61 | // | ||
62 | } | ||
63 | |||
64 | /** | ||
65 | * Update the specified resource in storage. | ||
66 | * | ||
67 | * @param \Illuminate\Http\Request $request | ||
68 | * @param \App\Models\type_area $type_area | ||
69 | * @return \Illuminate\Http\Response | ||
70 | */ | ||
71 | public function update(Request $request, type_area $type_area) | ||
72 | { | ||
73 | // | ||
74 | } | ||
75 | |||
76 | /** | ||
77 | * Remove the specified resource from storage. | ||
78 | * | ||
79 | * @param \App\Models\type_area $type_area | ||
80 | * @return \Illuminate\Http\Response | ||
81 | */ | ||
82 | public function destroy(type_area $type_area) | ||
83 | { | ||
84 | // | ||
85 | } | ||
86 | } | ||
87 |
app/Models/News.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Models; | 3 | namespace App\Models; |
4 | 4 | ||
5 | use Illuminate\Database\Eloquent\Factories\HasFactory; | 5 | use Illuminate\Database\Eloquent\Factories\HasFactory; |
6 | use Illuminate\Database\Eloquent\Model; | 6 | use Illuminate\Database\Eloquent\Model; |
7 | 7 | ||
8 | class News extends Model | 8 | class News extends Model |
9 | { | 9 | { |
10 | use HasFactory; | 10 | use HasFactory; |
11 | |||
12 | protected $fillable = ['title', 'text', 'foto']; | ||
13 | |||
11 | } | 14 | } |
12 | 15 |
database/migrations/2023_03_01_073041_create_news_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('news', function (Blueprint $table) { | 16 | Schema::create('news', function (Blueprint $table) { |
17 | $table->id(); | 17 | $table->id(); |
18 | $table->string('slug', 255); | 18 | //$table->string('slug', 255); |
19 | $table->string('title', 255); | 19 | $table->string('title', 255)->nullable(); |
20 | $table->text('text'); | 20 | $table->text('text')->nullable(); |
21 | $table->string('foto', 255); | 21 | $table->string('foto', 255)->nullable(); |
22 | $table->timestamps(); | 22 | $table->timestamps(); |
23 | }); | 23 | }); |
24 | } | 24 | } |
25 | 25 | ||
26 | /** | 26 | /** |
27 | * Reverse the migrations. | 27 | * Reverse the migrations. |
28 | * | 28 | * |
29 | * @return void | 29 | * @return void |
30 | */ | 30 | */ |
31 | public function down() | 31 | public function down() |
32 | { | 32 | { |
33 | Schema::dropIfExists('news'); | 33 | Schema::dropIfExists('news'); |
34 | } | 34 | } |
35 | }; | 35 | }; |
36 | 36 |
database/migrations/2023_03_01_073135_create_contacts_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('contacts', function (Blueprint $table) { | 16 | Schema::create('contacts', function (Blueprint $table) { |
17 | $table->id(); | 17 | $table->id(); |
18 | $table->string('email', 255)->nullable(false); | 18 | $table->string('email', 255)->nullable(false); |
19 | $table->string('telephone', 255)->nullable(false); | 19 | $table->string('telephone', 255)->nullable(false); |
20 | $table->string('title', 255)->default(''); | 20 | $table->string('title', 255)->default(''); |
21 | $table->string('title_t', 255)->default(''); | 21 | $table->string('title_t', 255)->default(''); |
22 | $table->text('description')->nullable(true); | 22 | $table->text('description')->nullable(true); |
23 | $table->string('whatapp', 255)->default(''); | 23 | $table->string('whatapp', 255)->default(''); |
24 | $table->string('telegram', 255)->default(''); | 24 | $table->string('telegram', 255)->default(''); |
25 | $table->string('title1', 255)->default(''); | 25 | $table->string('title1', 255)->default(''); |
26 | $table->text('text1')->nullable(true); | 26 | $table->text('text1')->nullable(true); |
27 | $table->string('title2', 255)->default(''); | 27 | $table->string('title2', 255)->default(''); |
28 | $table->text('text2')->nullable(true); | 28 | $table->text('text2')->nullable(true); |
29 | $table->string('title3', 255)->default(''); | 29 | $table->string('title3', 255)->default(''); |
30 | $table->text('text3')->nullable(true); | 30 | $table->text('text3')->nullable(true); |
31 | $table->integer('year')->default(15); | 31 | $table->integer('year')->default(15); |
32 | $table->text('conf')->nullable(); | ||
32 | $table->timestamps(); | 33 | $table->timestamps(); |
33 | }); | 34 | }); |
34 | } | 35 | } |
35 | 36 | ||
36 | /** | 37 | /** |
37 | * Reverse the migrations. | 38 | * Reverse the migrations. |
38 | * | 39 | * |
39 | * @return void | 40 | * @return void |
40 | */ | 41 | */ |
41 | public function down() | 42 | public function down() |
42 | { | 43 | { |
43 | Schema::dropIfExists('contacts'); | 44 | Schema::dropIfExists('contacts'); |
44 | } | 45 | } |
45 | }; | 46 | }; |
46 | 47 |
resources/views/admin/area/add_img.blade.php
File was created | 1 | @extends('layout.admin', ['title' => 'Создание нового объекта']) | |
2 | |||
3 | @section('content') | ||
4 | <section class="favorites"> | ||
5 | <div class="favorites-top"> | ||
6 | <div class="container"> | ||
7 | <div class="breadcrumbs"> | ||
8 | <ul class="breadcrumbs__list"> | ||
9 | <li class="breadcrumbs__item"><a class="breadcrumbs__link" href="{{ route('user.index') }}">Главная</a></li> | ||
10 | <li class="breadcrumbs__item"><a class="breadcrumbs__link" href="{{ route('admin.area.index') }}">Объекты недвижимости </a></li> | ||
11 | <li class="breadcrumbs__item"><span class="breadcrumbs__link">Добавление картинки объекта недвижимости </span></li> | ||
12 | </ul> | ||
13 | </div> | ||
14 | <h1 class="favorites__title title-main">Добавление картинки объекта недвижимости</h1> | ||
15 | </div> | ||
16 | </div> | ||
17 | <div class="favorites-cnt"> | ||
18 | <div class="container"> | ||
19 | <h3>Название: {{ $area->name_area }} ID: ({{ $area->id }})</h3> | ||
20 | <form method="post" enctype="multipart/form-data" action="{{ route('admin.img.add.area', ['area' => $area->id]) }}" style="width:100%"> | ||
21 | @csrf | ||
22 | <label for="foto">Файл-картинка:</label> | ||
23 | <input type="file" class="form-control-file txt" name="foto" id="foto" accept="image/png, image/jpeg"> | ||
24 | |||
25 | <br><br> | ||
26 | <button type="submit" class="btn hero-search__btn btn--main">Сохранить</button> | ||
27 | </form> | ||
28 | |||
29 | |||
30 | </div> | ||
31 | </div> | ||
32 | </section> | ||
33 | @endsection | ||
34 |
resources/views/admin/area/edit.blade.php
1 | @extends('layout.admin', ['title' => 'Изменение объекта']) | 1 | @extends('layout.admin', ['title' => 'Изменение объекта']) |
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="{{ route('user.index') }}">Главная</a></li> | 9 | <li class="breadcrumbs__item"><a class="breadcrumbs__link" href="{{ route('user.index') }}">Главная</a></li> |
10 | <li class="breadcrumbs__item"><a class="breadcrumbs__link" href="{{ route('admin.area.index') }}">Объекты недвижимости </a></li> | 10 | <li class="breadcrumbs__item"><a class="breadcrumbs__link" href="{{ route('admin.area.index') }}">Объекты недвижимости </a></li> |
11 | <li class="breadcrumbs__item"><span class="breadcrumbs__link">Изменение объекта недвижимости </span></li> | 11 | <li class="breadcrumbs__item"><span class="breadcrumbs__link">Изменение объекта недвижимости </span></li> |
12 | </ul> | 12 | </ul> |
13 | </div> | 13 | </div> |
14 | <h1 class="favorites__title title-main">Изменение объекта недвижимости</h1> | 14 | <h1 class="favorites__title title-main">Изменение объекта недвижимости</h1> |
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 | <form method="post" enctype="multipart/form-data" action="{{ route('admin.area.update', ['area' => $area->id]) }}" style="width:100%"> | 19 | <form method="post" enctype="multipart/form-data" action="{{ route('admin.area.update', ['area' => $area->id]) }}" style="width:100%"> |
20 | @include('admin.area.form') | 20 | @include('admin.area.form') |
21 | </form> | 21 | </form> |
22 | <br><br> | ||
23 | <h3>Дополнительные картинки</h3> | ||
24 | <a style="color:green" href="{{ route ('admin.img.area', ['area' => $area->id]) }}">Добавить картинку в галерею</a> | ||
25 | <table class="table" style="width: 100%"> | ||
26 | <thead> | ||
27 | <tr> | ||
28 | <th>ID</th> | ||
29 | <th>Фото</th> | ||
30 | <th>Действия</th> | ||
31 | </tr> | ||
32 | </thead> | ||
33 | <tbody> | ||
34 | @if ($area->fotos->count()) | ||
35 | @foreach($area->fotos as $img) | ||
36 | <tr> | ||
37 | <td><?=$img->id?></td> | ||
38 | <td><img src="<?=asset(Storage::url($img->foto))?>" width="100px"/></td> | ||
39 | <td><a href="{{ route('admin.img.del.area', ['id'=> $img->id, 'area' => $area->id]) }}">Удалить</a></td> | ||
40 | </tr> | ||
41 | @endforeach | ||
42 | @else | ||
43 | <tr> | ||
44 | <td>-</td> | ||
45 | <td>-</td> | ||
46 | <td>-</td> | ||
47 | </tr> | ||
48 | @endif | ||
49 | </tbody> | ||
50 | </table> | ||
22 | </div> | 51 | </div> |
23 | </div> | 52 | </div> |
24 | </section> | 53 | </section> |
25 | @endsection | 54 | @endsection |
26 | 55 | ||
27 | 56 |
resources/views/admin/company/edit.blade.php
File was created | 1 | @extends('layout.admin', ['title' => 'Редактирование реквизитов компании']) | |
2 | |||
3 | @section('content') | ||
4 | <section class="favorites"> | ||
5 | <div class="favorites-top"> | ||
6 | <div class="container"> | ||
7 | <div class="breadcrumbs"> | ||
8 | <ul class="breadcrumbs__list"> | ||
9 | <li class="breadcrumbs__item"><a class="breadcrumbs__link" href="{{ route('user.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 | </div> | ||
15 | </div> | ||
16 | <div class="favorites-cnt"> | ||
17 | <div class="container"> | ||
18 | <form method="post" enctype="multipart/form-data" action="{{ route('admin.company.update', ['company' => $firm_data->id])}}" style="width:100%"> | ||
19 | @csrf | ||
20 | |||
21 | @method('PUT') | ||
22 | |||
23 | <label for="email">Почта: </label><br> | ||
24 | @error('email') | ||
25 | <div class="alert alert-danger">{{ $message }}</div> | ||
26 | @enderror | ||
27 | <input type="text" class="form-control_ txt" name="email" placeholder="Почта" | ||
28 | required maxlength="100" style="width: 80%" value="{{ old('email') ?? $firm_data->email ?? '' }}"><br> | ||
29 | |||
30 | <label for="telephone">Телефон:</label><br> | ||
31 | @error('telephone') | ||
32 | <div class="alert alert-danger">{{ $message }}</div> | ||
33 | @enderror | ||
34 | <input type="text" class="form-control_ txt" name="telephone" placeholder="Телефон" | ||
35 | required maxlength="100" style="width: 80%" value="{{ old('telephone') ?? $firm_data->telephone ?? '' }}"><br> | ||
36 | |||
37 | |||
38 | <label for="title">Заголовок: </label><br> | ||
39 | @error('title') | ||
40 | <div class="alert alert-danger">{{ $message }}</div> | ||
41 | @enderror | ||
42 | <input type="text" class="form-control_ txt" name="title" placeholder="Заголовок" | ||
43 | required maxlength="100" style="width: 80%" value="{{ old('title') ?? $firm_data->title ?? '' }}"><br> | ||
44 | |||
45 | <label for="title_t">Подзаголовок: </label><br> | ||
46 | @error('title_t') | ||
47 | <div class="alert alert-danger">{{ $message }}</div> | ||
48 | @enderror | ||
49 | <input type="text" class="form-control_ txt" name="title_t" placeholder="Подзаголовок" | ||
50 | required maxlength="100" style="width: 80%" value="{{ old('title_t') ?? $firm_data->title_t ?? '' }}"><br> | ||
51 | |||
52 | <label for="description">Описание: </label><br> | ||
53 | @error('description') | ||
54 | <div class="alert alert-danger">{{ $message }}</div> | ||
55 | @enderror | ||
56 | <textarea class="form-control_ txtarea ckeditor" name="description" placeholder="Описание" required | ||
57 | rows="10" style="width: 80%">{{ old('description') ?? $firm_data->description ?? '' }}</textarea><br> | ||
58 | |||
59 | <label for="whatapp">WhatApp: </label><br> | ||
60 | @error('whatapp') | ||
61 | <div class="alert alert-danger">{{ $message }}</div> | ||
62 | @enderror | ||
63 | <input type="text" class="form-control_ txt" name="whatapp" placeholder="Whatapp" | ||
64 | required maxlength="100" style="width: 80%" value="{{ old('whatapp') ?? $firm_data->whatapp ?? '' }}"><br> | ||
65 | |||
66 | <label for="telegram">Телеграм: </label><br> | ||
67 | @error('telegram') | ||
68 | <div class="alert alert-danger">{{ $message }}</div> | ||
69 | @enderror | ||
70 | <input type="text" class="form-control_ txt" name="telegram" placeholder="Телеграмм" | ||
71 | required maxlength="100" style="width: 80%" value="{{ old('telegram') ?? $firm_data->telegram ?? '' }}"><br> | ||
72 | |||
73 | <label for="title1">Заголовок1 (для компании):</label><br> | ||
74 | @error('title1') | ||
75 | <div class="alert alert-danger">{{ $message }}</div> | ||
76 | @enderror | ||
77 | <input type="text" class="form-control_ txt" name="title1" placeholder="Заголовок 1" | ||
78 | required maxlength="100" style="width: 80%" value="{{ old('title1') ?? $firm_data->title1 ?? '' }}"><br> | ||
79 | |||
80 | <label for="text1">Описание1 (для компании): </label><br> | ||
81 | @error('text1') | ||
82 | <div class="alert alert-danger">{{ $message }}</div> | ||
83 | @enderror | ||
84 | <textarea class="form-control_ txtarea ckeditor" name="text1" placeholder="Описание" required | ||
85 | rows="10" style="width: 80%">{{ old('text1') ?? $firm_data->text1 ?? '' }}</textarea><br> | ||
86 | |||
87 | |||
88 | <label for="title2">Заголовок2 (для компании): </label><br> | ||
89 | @error('title2') | ||
90 | <div class="alert alert-danger">{{ $message }}</div> | ||
91 | @enderror | ||
92 | <input type="text" class="form-control_ txt" name="title2" placeholder="Заголовок" | ||
93 | required maxlength="100" style="width: 80%" value="{{ old('title2') ?? $firm_data->title2 ?? '' }}"><br> | ||
94 | |||
95 | <label for="text2">Описание2 (для компании): </label><br> | ||
96 | @error('text2') | ||
97 | <div class="alert alert-danger">{{ $message }}</div> | ||
98 | @enderror | ||
99 | <textarea class="form-control_ txtarea ckeditor" name="text2" placeholder="Описание" required | ||
100 | rows="10" style="width: 80%">{{ old('text2') ?? $firm_data->text2 ?? '' }}</textarea><br> | ||
101 | |||
102 | <label for="title3">Заголовок3 (для компании):</label><br> | ||
103 | @error('title3') | ||
104 | <div class="alert alert-danger">{{ $message }}</div> | ||
105 | @enderror | ||
106 | <input type="text" class="form-control_ txt" name="title3" placeholder="Заголовок3" | ||
107 | required maxlength="100" style="width: 80%" value="{{ old('title3') ?? $firm_data->title3 ?? '' }}"><br> | ||
108 | |||
109 | <label for="text3">Описание3 (для компании):</label><br> | ||
110 | @error('text3') | ||
111 | <div class="alert alert-danger">{{ $message }}</div> | ||
112 | @enderror | ||
113 | <textarea class="form-control_ txtarea ckeditor" name="text3" placeholder="Описание" required | ||
114 | rows="10" style="width: 80%">{{ old('text3') ?? $firm_data->text3 ?? '' }}</textarea><br> | ||
115 | |||
116 | <label for="year">Число лет на рынке (для компании): </label><br> | ||
117 | @error('year') | ||
118 | <div class="alert alert-danger">{{ $message }}</div> | ||
119 | @enderror | ||
120 | <input type="text" class="form-control_ txt" name="year" placeholder="Число лет на рынке" | ||
121 | required maxlength="100" style="width: 80%" value="{{ old('year') ?? $firm_data->year ?? '' }}"><br> | ||
122 | |||
123 | <label for="conf">Условие: <b>{{$firm_data->conf}}</b></label><br> | ||
124 | @error('conf') | ||
125 | <div class="alert alert-danger">{{ $message }}</div> | ||
126 | @enderror | ||
127 | <textarea class="form-control_ txtarea ckeditor" name="conf" placeholder="Соглашение" required | ||
128 | rows="10" style="width: 80%">{{ old('conf') ?? $firm_data->conf ?? '' }}</textarea><br><br> | ||
129 | <button type="submit" class="btn hero-search__btn btn--main">Сохранить</button> | ||
130 | </form> | ||
131 | </div> | ||
132 | </div> | ||
133 | </section> | ||
134 | @endsection | ||
135 |
resources/views/admin/company/view.blade.php
File was created | 1 | @extends('layout.admin', ['title' => 'Настройки компании']) | |
2 | |||
3 | @section('content') | ||
4 | <section class="favorites"> | ||
5 | <div class="favorites-top"> | ||
6 | <div class="container"> | ||
7 | <div class="breadcrumbs"> | ||
8 | <ul class="breadcrumbs__list"> | ||
9 | <li class="breadcrumbs__item"><a class="breadcrumbs__link" href="{{ route('user.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 | </div> | ||
15 | </div> | ||
16 | <div class="favorites-cnt"> | ||
17 | <div class="container"> | ||
18 | <a href="{{ route('admin.company.edit', ['company' => 1]) }}" class="btn hero-search__btn btn--main"> | ||
19 | Редактировать реквизиты компании | ||
20 | </a><br><br> | ||
21 | |||
22 | <label for="email">Почта: <b>{{$firm_data->email}}</b></label><br><br> | ||
23 | |||
24 | <label for="telephone">Телефон: <b>{{$firm_data->telephone}}</b></label><br><br> | ||
25 | |||
26 | <label for="title">Заголовок: <b>{{$firm_data->title}}</b></label><br><br> | ||
27 | |||
28 | <label for="title">Подзаголовок: <b>{{$firm_data->title_t}}</b></label><br><br> | ||
29 | |||
30 | <label for="title">Описание: <b>{{$firm_data->description}}</b></label><br><br> | ||
31 | |||
32 | <label for="title">WhatApp: <b>{{$firm_data->whatapp}}</b></label><br><br> | ||
33 | |||
34 | <label for="title">Телеграм: <b>{{$firm_data->telegram}}</b></label><br><br> | ||
35 | |||
36 | <label for="title">Заголовок1 (для компании): <b>{{$firm_data->title1}}</b></label><br><br> | ||
37 | |||
38 | <label for="title">Описание1 (для компании): <b>{{$firm_data->text1}}</b></label><br><br> | ||
39 | |||
40 | <label for="title">Заголовок2 (для компании): <b>{{$firm_data->title2}}</b></label><br><br> | ||
41 | |||
42 | <label for="title">Описание2 (для компании): <b>{{$firm_data->text2}}</b></label><br><br> | ||
43 | |||
44 | <label for="title">Заголовок3 (для компании): <b>{{$firm_data->title3}}</b></label><br><br> | ||
45 | |||
46 | <label for="title">Описание3 (для компании): <b>{{$firm_data->text3}}</b></label><br><br> | ||
47 | |||
48 | <label for="title">Число лет на рынке (для компании): <b>{{$firm_data->year}}</b></label><br><br> | ||
49 | |||
50 | <label for="title">Условие: <b>{{$firm_data->conf}}</b></label><br><br> | ||
51 | |||
52 | |||
53 | |||
54 | |||
55 | |||
56 | |||
57 | </div> | ||
58 | </div> | ||
59 | </section> | ||
60 | @endsection | ||
61 |
resources/views/admin/news/create.blade.php
File was created | 1 | @extends('layout.admin', ['title' => 'Создание новости']) | |
2 | |||
3 | @section('content') | ||
4 | <section class="favorites"> | ||
5 | <div class="favorites-top"> | ||
6 | <div class="container"> | ||
7 | <div class="breadcrumbs"> | ||
8 | <ul class="breadcrumbs__list"> | ||
9 | <li class="breadcrumbs__item"><a class="breadcrumbs__link" href="{{ route('user.index') }}">Главная</a></li> | ||
10 | <li class="breadcrumbs__item"><a class="breadcrumbs__link" href="{{ route('admin.news.index') }}">Новости </a></li> | ||
11 | <li class="breadcrumbs__item"><span class="breadcrumbs__link">Создание новости </span></li> | ||
12 | </ul> | ||
13 | </div> | ||
14 | <h1 class="favorites__title title-main">Создание новости</h1> | ||
15 | </div> | ||
16 | </div> | ||
17 | <div class="favorites-cnt"> | ||
18 | <div class="container"> | ||
19 | <form method="post" enctype="multipart/form-data" action="{{ route('admin.news.store') }}" style="width:100%"> | ||
20 | @include('admin.news.form') | ||
21 | </form> | ||
22 | </div> | ||
23 | </div> | ||
24 | </section> | ||
25 | @endsection | ||
26 |
resources/views/admin/news/edit.blade.php
File was created | 1 | @extends('layout.admin', ['title' => 'Создание новости']) | |
2 | |||
3 | @section('content') | ||
4 | <section class="favorites"> | ||
5 | <div class="favorites-top"> | ||
6 | <div class="container"> | ||
7 | <div class="breadcrumbs"> | ||
8 | <ul class="breadcrumbs__list"> | ||
9 | <li class="breadcrumbs__item"><a class="breadcrumbs__link" href="{{ route('user.index') }}">Главная</a></li> | ||
10 | <li class="breadcrumbs__item"><a class="breadcrumbs__link" href="{{ route('admin.news.index') }}">Новости </a></li> | ||
11 | <li class="breadcrumbs__item"><span class="breadcrumbs__link">Редактирование новости </span></li> | ||
12 | </ul> | ||
13 | </div> | ||
14 | <h1 class="favorites__title title-main">Редактирование новости</h1> | ||
15 | </div> | ||
16 | </div> | ||
17 | <div class="favorites-cnt"> | ||
18 | <div class="container"> | ||
19 | <form method="post" enctype="multipart/form-data" action="{{ route('admin.news.update', ['news' => $news->id])}}" style="width:100%"> | ||
20 | @include('admin.news.form') | ||
21 | </form> | ||
22 | </div> | ||
23 | </div> | ||
24 | </section> | ||
25 | @endsection | ||
26 |
resources/views/admin/news/form.blade.php
File was created | 1 | @csrf | |
2 | |||
3 | @isset($news) | ||
4 | @method('PUT') | ||
5 | @endisset | ||
6 | |||
7 | <label for="name_area">Заголовок новости: <span class="req">*</span></label> | ||
8 | @error('title') | ||
9 | <div class="alert alert-danger">{{ $message }}</div> | ||
10 | @enderror | ||
11 | <input type="text" class="form-control_ txt" name="title" placeholder="Заголовок новости" | ||
12 | required maxlength="100" style="width: 80%" value="{{ old('title') ?? $news->title ?? '' }}"><br> | ||
13 | |||
14 | <label for="text">Текст новости: <span class="req">*</span></label> | ||
15 | @error('text') | ||
16 | <div class="alert alert-danger">{{ $message }}</div> | ||
17 | @enderror | ||
18 | <textarea class="form-control_ txtarea ckeditor" name="text" placeholder="Текст новости" required | ||
19 | rows="10" style="width: 80%">{{ old('text') ?? $news->text ?? '' }}</textarea><br> | ||
20 | |||
21 | <label for="foto">Файл-картинка:</label> | ||
22 | <input type="file" class="form-control-file txt" name="foto" id="foto" accept="image/png, image/jpeg"> | ||
23 | |||
24 | @isset($news->foto) | ||
25 | <div class="form-group form-check"> | ||
26 | <img src="<?=asset(Storage::url($news->foto))?>" width="100px"/> | ||
27 | <input type="checkbox" class="form-check-input" name="remove" id="remove"> | ||
28 | <label class="form-check-label" for="remove"> | ||
29 | Удалить загруженное изображение | ||
30 | </label> | ||
31 | </div> | ||
32 | @endisset | ||
33 | <br><br> | ||
34 | <button type="submit" class="btn hero-search__btn btn--main">Сохранить</button> | ||
35 |
resources/views/admin/news/index.blade.php
File was created | 1 | @extends('layout.admin', ['title' => 'Новости']) | |
2 | |||
3 | @section('content') | ||
4 | <section class="favorites"> | ||
5 | <div class="favorites-top"> | ||
6 | <div class="container"> | ||
7 | <div class="breadcrumbs"> | ||
8 | <ul class="breadcrumbs__list"> | ||
9 | <li class="breadcrumbs__item"><a class="breadcrumbs__link" href="{{ route('user.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 | </div> | ||
15 | </div> | ||
16 | <div class="favorites-cnt"> | ||
17 | <div class="container"> | ||
18 | <a href="{{ route('admin.news.create') }}" class="btn hero-search__btn btn--main"> | ||
19 | Создать новость | ||
20 | </a><br><br> | ||
21 | <table class="table" style="width: 100%"> | ||
22 | <thead> | ||
23 | <tr> | ||
24 | <th>Фото</th> | ||
25 | <th>ID</th> | ||
26 | <th>Название новости</th> | ||
27 | <th>Дата создания</th> | ||
28 | <th>Действия</th> | ||
29 | </tr> | ||
30 | </thead> | ||
31 | <tbody> | ||
32 | @if ($news->count()) | ||
33 | @foreach($news as $new) | ||
34 | <tr> | ||
35 | <td><? if (empty($new->foto)) {?>Нет фото<?} else {?><img src="<?=asset(Storage::url($new->foto))?>" width="100px"/><?}?></td> | ||
36 | <td>{{ $new->id }}</td> | ||
37 | <td>{{ $new->title }}</td> | ||
38 | <td>{{ $new->created_at }}</td> | ||
39 | <td> <form action="{{ route('admin.news.destroy', $new) }}" method="POST"> | ||
40 | <a style="color:green" href="{{ route('admin.news.show', ['news' => $new->id]) }}"> | ||
41 | Просмотр | ||
42 | </a> | | ||
43 | <a href="{{ route('admin.news.edit', ['news' => $new->id]) }}"> | ||
44 | Редактировать | ||
45 | </a> | | ||
46 | @csrf | ||
47 | @method('DELETE') | ||
48 | <input class=" btn-danger" type="submit" value="Удалить"> | ||
49 | </form> | ||
50 | </td> | ||
51 | </tr> | ||
52 | @endforeach | ||
53 | @else | ||
54 | <tr> | ||
55 | <td>-</td> | ||
56 | <td>-</td> | ||
57 | <td>-</td> | ||
58 | <td>-</td> | ||
59 | <td>-</td> | ||
60 | </tr> | ||
61 | @endif | ||
62 | |||
63 | </tbody> | ||
64 | </table> | ||
65 | {{ $news->onEachSide(1)->links('catalogs.paginate') }} | ||
66 | <div class="favorites__items"> | ||
67 | |||
68 | |||
69 | |||
70 | <!--<div class="favorites-item"> | ||
71 | <div class="favorites-item__img"><img src="images/favorites/favorites-item-img-1.svg" alt=""></div> | ||
72 | <p class="favorites-item__descr"><a href="#">Найдите</a> идеальную планировку на сайте Renttorg</p> | ||
73 | </div> | ||
74 | <div class="favorites-item"> | ||
75 | <div class="favorites-item__img"><img src="images/favorites/favorites-item-img-2.svg" alt=""></div> | ||
76 | <p class="favorites-item__descr">Нажмите на <img src="images/favorites-icon-mini.svg" alt=""> для добавления недвижемости в избранное</p> | ||
77 | </div> | ||
78 | <div class="favorites-item"> | ||
79 | <div class="favorites-item__img"><img src="images/favorites/favorites-item-img-3.svg" alt=""></div> | ||
80 | <p class="favorites-item__descr">Перейдите в избранное или сравнение для выбора планировки</p> | ||
81 | </div>--> | ||
82 | </div> | ||
83 | </div> | ||
84 | </div> | ||
85 | </section> | ||
86 | @endsection | ||
87 |
resources/views/admin/news/view.blade.php
File was created | 1 | @extends('layout.admin', ['title' => 'Просмотр новости']) | |
2 | |||
3 | @section('content') | ||
4 | <section class="favorites"> | ||
5 | <div class="favorites-top"> | ||
6 | <div class="container"> | ||
7 | <div class="breadcrumbs"> | ||
8 | <ul class="breadcrumbs__list"> | ||
9 | <li class="breadcrumbs__item"><a class="breadcrumbs__link" href="{{ route('user.index') }}">Главная</a></li> | ||
10 | <li class="breadcrumbs__item"><a class="breadcrumbs__link" href="{{ route('admin.news.index') }}">Новости </a></li> | ||
11 | <li class="breadcrumbs__item"><span class="breadcrumbs__link">Просмотр новости </span></li> | ||
12 | </ul> | ||
13 | </div> | ||
14 | <h1 class="favorites__title title-main">Просмотр новости</h1> | ||
15 | </div> | ||
16 | </div> | ||
17 | <div class="favorites-cnt"> | ||
18 | <div class="container"> | ||
19 | <label for="name_area">Заголовок новости: <span class="req">*</span></label> | ||
20 | <input type="text" class="form-control_ txt" name="title" placeholder="Заголовок новости" | ||
21 | required maxlength="100" style="width: 80%" value="{{ old('title') ?? $news->title ?? '' }}"><br> | ||
22 | |||
23 | <label for="text">Текст новости: <span class="req">*</span></label> | ||
24 | <textarea class="form-control_ txtarea ckeditor" name="text" placeholder="Текст новости" required | ||
25 | rows="10" style="width: 80%">{{ old('text') ?? $news->text ?? '' }}</textarea><br> | ||
26 | |||
27 | <label for="foto">Файл-картинка:</label> | ||
28 | @isset($news->foto) | ||
29 | <div class="form-group form-check"> | ||
30 | <img src="<?=asset(Storage::url($news->foto))?>" width="100px"/> | ||
31 | </div> | ||
32 | @endisset | ||
33 | <br><br> | ||
34 | <a href="{{ route('admin.news.index') }}" class="btn hero-search__btn btn--main">Вернуться к новостям</a> | ||
35 | </div> | ||
36 | </div> | ||
37 | </section> | ||
38 | @endsection | ||
39 |
resources/views/layout/admin.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 | <link rel="stylesheet" href="{{ asset('css/style_table.css') }}"> | 17 | <link rel="stylesheet" href="{{ asset('css/style_table.css') }}"> |
18 | <style> | 18 | <style> |
19 | /* form styles */ | 19 | /* form styles */ |
20 | form .row { | 20 | form .row { |
21 | display: block; | 21 | display: block; |
22 | padding: 7px 8px; | 22 | padding: 7px 8px; |
23 | margin-bottom: 7px; | 23 | margin-bottom: 7px; |
24 | } | 24 | } |
25 | form .row:hover { | 25 | form .row:hover { |
26 | background: #f1f7fa; | 26 | background: #f1f7fa; |
27 | } | 27 | } |
28 | 28 | ||
29 | form label { | 29 | form label { |
30 | display: inline-block; | 30 | display: inline-block; |
31 | font-size: 1.2em; | 31 | font-size: 1.2em; |
32 | font-weight: bold; | 32 | font-weight: bold; |
33 | width: 120px; | 33 | width: 120px; |
34 | padding: 6px 0; | 34 | padding: 6px 0; |
35 | color: #464646; | 35 | color: #464646; |
36 | vertical-align: top; | 36 | vertical-align: top; |
37 | } | 37 | } |
38 | form .req { color: #ca5354; } | 38 | form .req { color: #ca5354; } |
39 | 39 | ||
40 | form .note { | 40 | form .note { |
41 | font-size: 1.2em; | 41 | font-size: 1.2em; |
42 | line-height: 1.33em; | 42 | line-height: 1.33em; |
43 | font-weight: normal; | 43 | font-weight: normal; |
44 | padding: 2px 7px; | 44 | padding: 2px 7px; |
45 | margin-bottom: 10px; | 45 | margin-bottom: 10px; |
46 | } | 46 | } |
47 | 47 | ||
48 | form input:focus, form textarea:focus { outline: none; } | 48 | form input:focus, form textarea:focus { outline: none; } |
49 | 49 | ||
50 | /* placeholder styles: http://stackoverflow.com/a/2610741/477958 */ | 50 | /* placeholder styles: http://stackoverflow.com/a/2610741/477958 */ |
51 | ::-webkit-input-placeholder { color: #aaafbd; font-style: italic; } /* WebKit */ | 51 | ::-webkit-input-placeholder { color: #aaafbd; font-style: italic; } /* WebKit */ |
52 | :-moz-placeholder { color: #aaafbd; font-style: italic; } /* Mozilla Firefox 4 to 18 */ | 52 | :-moz-placeholder { color: #aaafbd; font-style: italic; } /* Mozilla Firefox 4 to 18 */ |
53 | ::-moz-placeholder { color: #aaafbd; font-style: italic; } /* Mozilla Firefox 19+ */ | 53 | ::-moz-placeholder { color: #aaafbd; font-style: italic; } /* Mozilla Firefox 19+ */ |
54 | :-ms-input-placeholder { color: #aaafbd; font-style: italic; } /* Internet Explorer 10+ */ | 54 | :-ms-input-placeholder { color: #aaafbd; font-style: italic; } /* Internet Explorer 10+ */ |
55 | 55 | ||
56 | form .txt { | 56 | form .txt { |
57 | display: inline-block; | 57 | display: inline-block; |
58 | padding: 8px 9px; | 58 | padding: 8px 9px; |
59 | padding-right: 30px; | 59 | padding-right: 30px; |
60 | width: 240px; | 60 | width: 240px; |
61 | font-family: 'Oxygen', sans-serif; | 61 | font-family: 'Oxygen', sans-serif; |
62 | font-size: 1.35em; | 62 | font-size: 1.35em; |
63 | font-weight: normal; | 63 | font-weight: normal; |
64 | color: #898989; | 64 | color: #898989; |
65 | } | 65 | } |
66 | 66 | ||
67 | form .txtarea { | 67 | form .txtarea { |
68 | display: inline-block; | 68 | display: inline-block; |
69 | padding: 8px 9px; | 69 | padding: 8px 9px; |
70 | padding-right: 30px; | 70 | padding-right: 30px; |
71 | font-family: 'Oxygen', sans-serif; | 71 | font-family: 'Oxygen', sans-serif; |
72 | font-size: 1.35em; | 72 | font-size: 1.35em; |
73 | font-weight: normal; | 73 | font-weight: normal; |
74 | color: #898989; | 74 | color: #898989; |
75 | } | 75 | } |
76 | </style> | 76 | </style> |
77 | </head> | 77 | </head> |
78 | <body> | 78 | <body> |
79 | <div class="spinner"></div> | 79 | <div class="spinner"></div> |
80 | <div class="wrapper"> | 80 | <div class="wrapper"> |
81 | <header class="header js_header"> | 81 | <header class="header js_header"> |
82 | <div class="container"> | 82 | <div class="container"> |
83 | <div class="header__wrap"><a class="header__logo" href="{{ route('index') }}"><img src="{{ asset('images/logo.svg') }}" alt="Лого"></a> | 83 | <div class="header__wrap"><a class="header__logo" href="{{ route('index') }}"><img src="{{ asset('images/logo.svg') }}" alt="Лого"></a> |
84 | <nav class="header__nav nav"> | 84 | <nav class="header__nav nav"> |
85 | <ul class="nav__list"> | 85 | <ul class="nav__list"> |
86 | <li class="nav__item"><a class="nav__link" href="{{ route('admin.area.index') }}">Объекты</a></li> | 86 | <li class="nav__item"><a class="nav__link" href="{{ route('admin.area.index') }}">Объекты</a></li> |
87 | <li class="nav__item"><a class="nav__link" href="{{ route('about') }}">О компании</a></li> | 87 | <li class="nav__item"><a class="nav__link" href="{{ route('admin.news.index') }}">Новости</a></li> |
88 | <li class="nav__item"><a class="nav__link" href="{{ route('contact') }}">Контакты</a></li> | 88 | <li class="nav__item"><a class="nav__link" href="{{ route('admin.company.show', ['company' => 1]) }}">Компания</a></li> |
89 | <li class="nav__item"><a class="nav__link nav__link-favorites" href="{{ route('favorite') }}">Избранное<span><?=\App\Classes\RusDate::count_item_fav();?></span></a></li> | 89 | <li class="nav__item"><a class="nav__link nav__link-favorites" href="{{ route('favorite') }}">Избранное<span><?=\App\Classes\RusDate::count_item_fav();?></span></a></li> |
90 | </ul> | 90 | </ul> |
91 | </nav> | 91 | </nav> |
92 | <div class="header__buttons"><a class="header__btn-phone" href="#" data-btn="feedback"> | 92 | <div class="header__buttons"><a class="header__btn-phone" href="#" data-btn="feedback"> |
93 | <svg width="22" height="22"> | 93 | <svg width="22" height="22"> |
94 | <use xlink:href="{{ asset('images/sprite.svg#header-btn-phone') }}"></use> | 94 | <use xlink:href="{{ asset('images/sprite.svg#header-btn-phone') }}"></use> |
95 | </svg></a> | 95 | </svg></a> |
96 | <button class="header__burger js_header_burger" type="button">Меню | 96 | <button class="header__burger js_header_burger" type="button">Меню |
97 | <svg width="28" height="18"> | 97 | <svg width="28" height="18"> |
98 | <use xlink:href="{{ asset('images/sprite.svg#burger') }}"></use> | 98 | <use xlink:href="{{ asset('images/sprite.svg#burger') }}"></use> |
99 | </svg> | 99 | </svg> |
100 | </button> | 100 | </button> |
101 | </div> | 101 | </div> |
102 | <div class="menu js_menu"> | 102 | <div class="menu js_menu"> |
103 | <div class="menu__wrap"> | 103 | <div class="menu__wrap"> |
104 | <button class="menu__close js_menu_close" type="button">Меню | 104 | <button class="menu__close js_menu_close" type="button">Меню |
105 | <svg width="20" height="20"> | 105 | <svg width="20" height="20"> |
106 | <use xlink:href="{{ asset('images/sprite.svg#popup-close') }}"></use> | 106 | <use xlink:href="{{ asset('images/sprite.svg#popup-close') }}"></use> |
107 | </svg> | 107 | </svg> |
108 | </button> | 108 | </button> |
109 | <div class="menu__inner"> | 109 | <div class="menu__inner"> |
110 | <nav class="menu__nav"> | 110 | <nav class="menu__nav"> |
111 | <ul class="menu__list"> | 111 | <ul class="menu__list"> |
112 | <li class="menu__item"><a class="menu__link" href="{{ route('about') }}">О компании</a></li> | 112 | <li class="menu__item"><a class="menu__link" href="{{ route('admin.area.index') }}">Объекты</a></li> |
113 | <li class="menu__item"><a class="menu__link menu__link-favorites" href="{{ route('favorite') }}">Избранное<span>5</span></a></li> | 113 | <li class="menu__item"><a class="menu__link" href="{{ route('admin.news.index') }}">Новости</a></li> |
114 | <li class="menu__item"><a class="menu__link" href="{{ route('catalog') }}">Каталог</a></li> | 114 | <li class="menu__item"><a class="menu__link" href="{{ route('admin.company.show', ['company' => 1]) }}">Компания</a></li> |
115 | <li class="menu__item"><a class="menu__link" href="{{ route('news') }}">Новости</a></li> | 115 | <li class="menu__item"><a class="menu__link" href="{{ route('news') }}">Новости</a></li> |
116 | <li class="menu__item"><a class="menu__link" href="{{ route('contact') }}">Контакты</a></li> | 116 | <li class="menu__item"><a class="menu__link" href="{{ route('contact') }}">Контакты</a></li> |
117 | </ul> | 117 | </ul> |
118 | </nav> | 118 | </nav> |
119 | <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> | 119 | <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> |
120 | <div class="menu__social social"> | 120 | <div class="menu__social social"> |
121 | <ul class="social__list"> | 121 | <ul class="social__list"> |
122 | <li class="social__item"><a class="social__link" href="#" target="_blank"><img src="{{ asset('images/tg.svg') }}" alt=""></a></li> | 122 | <li class="social__item"><a class="social__link" href="#" target="_blank"><img src="{{ asset('images/tg.svg') }}" alt=""></a></li> |
123 | <li class="social__item"><a class="social__link" href="#" target="_blank"> | 123 | <li class="social__item"><a class="social__link" href="#" target="_blank"> |
124 | <svg width="40" height="40"> | 124 | <svg width="40" height="40"> |
125 | <use xlink:href="{{ asset('images/sprite.svg#wa')}}"></use> | 125 | <use xlink:href="{{ asset('images/sprite.svg#wa')}}"></use> |
126 | </svg></a></li> | 126 | </svg></a></li> |
127 | </ul> | 127 | </ul> |
128 | </div> | 128 | </div> |
129 | </div> | 129 | </div> |
130 | </div> | 130 | </div> |
131 | </div> | 131 | </div> |
132 | </div> | 132 | </div> |
133 | </div> | 133 | </div> |
134 | </header> | 134 | </header> |
135 | <main> | 135 | <main> |
136 | @if ($message = Session::get('success')) | 136 | @if ($message = Session::get('success')) |
137 | <section> | 137 | <section> |
138 | <div class="alert alert-success alert-dismissible mt-0" role="alert"> | 138 | <div class="alert alert-success alert-dismissible mt-0" role="alert"> |
139 | <button type="button" class="close" data-dismiss="alert" aria-label="Закрыть"> | 139 | <button type="button" class="close" data-dismiss="alert" aria-label="Закрыть"> |
140 | <span aria-hidden="true">×</span> | 140 | <span aria-hidden="true">×</span> |
141 | </button> | 141 | </button> |
142 | {{ $message }} | 142 | {{ $message }} |
143 | </div> | 143 | </div> |
144 | </section> | 144 | </section> |
145 | @endif | 145 | @endif |
146 | 146 | ||
147 | @if ($errors->any()) | 147 | @if ($errors->any()) |
148 | <section> | 148 | <section> |
149 | <div class="alert alert-danger alert-dismissible mt-4" role="alert"> | 149 | <div class="alert alert-danger alert-dismissible mt-4" role="alert"> |
150 | <button type="button" class="close" data-dismiss="alert" aria-label="Закрыть"> | 150 | <button type="button" class="close" data-dismiss="alert" aria-label="Закрыть"> |
151 | <span aria-hidden="true">×</span> | 151 | <span aria-hidden="true">×</span> |
152 | </button> | 152 | </button> |
153 | <ul class="mb-0"> | 153 | <ul class="mb-0"> |
154 | @foreach ($errors->all() as $error) | 154 | @foreach ($errors->all() as $error) |
155 | <li>{{ $error }}</li> | 155 | <li>{{ $error }}</li> |
156 | @endforeach | 156 | @endforeach |
157 | </ul> | 157 | </ul> |
158 | </div> | 158 | </div> |
159 | </section> | 159 | </section> |
160 | @endif | 160 | @endif |
161 | <!-- Основной контент --> | 161 | <!-- Основной контент --> |
162 | @yield('content') | 162 | @yield('content') |
163 | 163 | ||
164 | </main> | 164 | </main> |
165 | 165 | ||
166 | <footer class="footer" style="background-image:url({{ asset('images/footer-bg.jpg')}})"> | 166 | <footer class="footer" style="background-image:url({{ asset('images/footer-bg.jpg')}})"> |
167 | <div class="footer__buttons"> | 167 | <div class="footer__buttons"> |
168 | <button class="footer__btn footer__btn-phone js_btn_contact_us" type="button"> | 168 | <button class="footer__btn footer__btn-phone js_btn_contact_us" type="button"> |
169 | <svg width="30" height="32"> | 169 | <svg width="30" height="32"> |
170 | <use xlink:href="{{ asset('images/sprite.svg#footer-btn-phone')}}"></use> | 170 | <use xlink:href="{{ asset('images/sprite.svg#footer-btn-phone')}}"></use> |
171 | </svg> | 171 | </svg> |
172 | </button> | 172 | </button> |
173 | <button class="footer__btn footer__btn-up js_btn_up" type="button"> | 173 | <button class="footer__btn footer__btn-up js_btn_up" type="button"> |
174 | <svg width="19" height="11"> | 174 | <svg width="19" height="11"> |
175 | <use xlink:href="{{ asset('images/sprite.svg#footer-btn-up')}}"></use> | 175 | <use xlink:href="{{ asset('images/sprite.svg#footer-btn-up')}}"></use> |
176 | </svg> | 176 | </svg> |
177 | </button> | 177 | </button> |
178 | </div> | 178 | </div> |
179 | 179 | ||
180 | <!-- Сам футер мееню --> | 180 | <!-- Сам футер мееню --> |
181 | <div class="footer-middle"> | 181 | <div class="footer-middle"> |
182 | <div class="container"> | 182 | <div class="container"> |
183 | <div class="footer-middle__wrap"> | 183 | <div class="footer-middle__wrap"> |
184 | <div class="footer__col footer__col-intro"><a class="footer__logo" href="index.html"><img src="{{ asset('images/logo-footer.svg')}}" alt="Лого"></a> | 184 | <div class="footer__col footer__col-intro"><a class="footer__logo" href="index.html"><img src="{{ asset('images/logo-footer.svg')}}" alt="Лого"></a> |
185 | <p class="footer__descr">В группу “Renttorg” входит ряд ведущих российских девелоперских компаний полного цикла, реализующих масштабные объекты недвижимости.</p> | 185 | <p class="footer__descr">В группу “Renttorg” входит ряд ведущих российских девелоперских компаний полного цикла, реализующих масштабные объекты недвижимости.</p> |
186 | <div class="footer-questions"> | 186 | <div class="footer-questions"> |
187 | <h3 class="footer-questions__title">Есть вопросы или предложения?</h3><a class="footer-questions__btn btn btn--main" href="#" data-btn="feedback">Напишите нам</a> | 187 | <h3 class="footer-questions__title">Есть вопросы или предложения?</h3><a class="footer-questions__btn btn btn--main" href="#" data-btn="feedback">Напишите нам</a> |
188 | </div> | 188 | </div> |
189 | </div> | 189 | </div> |
190 | <div class="footer__col footer__col-menu js_footer_col"> | 190 | <div class="footer__col footer__col-menu js_footer_col"> |
191 | <h3 class="footer__caption js_footer_caption">Меню</h3> | 191 | <h3 class="footer__caption js_footer_caption">Меню</h3> |
192 | <div class="footer__block js_footer_block"> | 192 | <div class="footer__block js_footer_block"> |
193 | <ul class="footer__list"> | 193 | <ul class="footer__list"> |
194 | <li class="footer__item"><a class="footer__link" href="{{ route('index') }}">Главная</a></li> | 194 | <li class="footer__item"><a class="footer__link" href="{{ route('index') }}">Главная</a></li> |
195 | <li class="footer__item"><a class="footer__link" href="{{ route('catalog') }}">Каталог</a></li> | 195 | <li class="footer__item"><a class="footer__link" href="{{ route('catalog') }}">Каталог</a></li> |
196 | <li class="footer__item"><a class="footer__link" href="{{ route('about') }}">О компании</a></li> | 196 | <li class="footer__item"><a class="footer__link" href="{{ route('about') }}">О компании</a></li> |
197 | <li class="footer__item"><a class="footer__link" href="{{ route('contact') }}">Контакты</a></li> | 197 | <li class="footer__item"><a class="footer__link" href="{{ route('contact') }}">Контакты</a></li> |
198 | <li class="footer__item"><a class="footer__link" href="{{ route('favorite') }}">Избранное</a></li> | 198 | <li class="footer__item"><a class="footer__link" href="{{ route('favorite') }}">Избранное</a></li> |
199 | <li class="footer__item"><a class="footer__link" href="{{ route('news') }}">Новости</a></li> | 199 | <li class="footer__item"><a class="footer__link" href="{{ route('news') }}">Новости</a></li> |
200 | </ul> | 200 | </ul> |
201 | 201 | ||
202 | </div><a class="footer__author" href="#" target="_blank"><img src="{{ asset('images/author.png')}}" alt="Лого разработчика"></a> | 202 | </div><a class="footer__author" href="#" target="_blank"><img src="{{ asset('images/author.png')}}" alt="Лого разработчика"></a> |
203 | </div> | 203 | </div> |
204 | <div class="footer__col js_footer_col"> | 204 | <div class="footer__col js_footer_col"> |
205 | <h3 class="footer__caption js_footer_caption">Админка</h3> | 205 | <h3 class="footer__caption js_footer_caption">Админка</h3> |
206 | <div class="footer__block js_footer_block"> | 206 | <div class="footer__block js_footer_block"> |
207 | <ul class="footer__list"> | 207 | <ul class="footer__list"> |
208 | <li class="footer__item"><a class="footer__link" href="{{ route('user.index') }}">Главная</a></li> | 208 | <li class="footer__item"><a class="footer__link" href="{{ route('user.index') }}">Главная</a></li> |
209 | 209 | ||
210 | </ul> | 210 | </ul> |
211 | </div> | 211 | </div> |
212 | </div> | 212 | </div> |
213 | <div class="footer__col js_footer_col"> | 213 | <div class="footer__col js_footer_col"> |
214 | <h3 class="footer__caption js_footer_caption">Система</h3> | 214 | <h3 class="footer__caption js_footer_caption">Система</h3> |
215 | <div class="footer__block js_footer_block"> | 215 | <div class="footer__block js_footer_block"> |
216 | <ul class="footer__list"> | 216 | <ul class="footer__list"> |
217 | <li class="footer__item"><a class="footer__link" href="{{ route('auth.login') }}">Авторизация</a></li> | 217 | <li class="footer__item"><a class="footer__link" href="{{ route('auth.login') }}">Авторизация</a></li> |
218 | <li class="footer__item"><a class="footer__link" href="{{ route('auth.register') }}">Регистрация</a></li> | 218 | <li class="footer__item"><a class="footer__link" href="{{ route('auth.register') }}">Регистрация</a></li> |
219 | </ul> | 219 | </ul> |
220 | </div> | 220 | </div> |
221 | </div> | 221 | </div> |
222 | <div class="footer__col footer__col-contacts"> | 222 | <div class="footer__col footer__col-contacts"> |
223 | <h3 class="footer__caption js_footer_caption">Контакты</h3> | 223 | <h3 class="footer__caption js_footer_caption">Контакты</h3> |
224 | <ul class="footer__list"> | 224 | <ul class="footer__list"> |
225 | <li class="footer__item"><a class="footer__link" href="">EmailAdmin</a></li> | 225 | <li class="footer__item"><a class="footer__link" href="">EmailAdmin</a></li> |
226 | <li class="footer__item"><a class="footer__link" href="">ТелефонАдмин</a></li> | 226 | <li class="footer__item"><a class="footer__link" href="">ТелефонАдмин</a></li> |
227 | </ul> | 227 | </ul> |
228 | <div class="footer__social social"> | 228 | <div class="footer__social social"> |
229 | <ul class="social__list"> | 229 | <ul class="social__list"> |
230 | <li class="social__item"><a class="social__link" href="#" target="_blank"><img src="{{ asset('images/tg.svg')}}" alt=""></a></li> | 230 | <li class="social__item"><a class="social__link" href="#" target="_blank"><img src="{{ asset('images/tg.svg')}}" alt=""></a></li> |
231 | <li class="social__item"><a class="social__link" href="#" target="_blank"> | 231 | <li class="social__item"><a class="social__link" href="#" target="_blank"> |
232 | <svg width="40" height="40"> | 232 | <svg width="40" height="40"> |
233 | <use xlink:href="{{ asset('images/sprite.svg#wa') }}"></use> | 233 | <use xlink:href="{{ asset('images/sprite.svg#wa') }}"></use> |
234 | </svg></a></li> | 234 | </svg></a></li> |
235 | </ul> | 235 | </ul> |
236 | </div> | 236 | </div> |
237 | </div> | 237 | </div> |
238 | </div> | 238 | </div> |
239 | </div> | 239 | </div> |
240 | </div> | 240 | </div> |
241 | 241 | ||
242 | <div class="footer-bottom"> | 242 | <div class="footer-bottom"> |
243 | <div class="container"> | 243 | <div class="container"> |
244 | <div class="footer-bottom__wrap"> | 244 | <div class="footer-bottom__wrap"> |
245 | <div class="footer__copy">© 2023 RentTorg</div><a class="footer__plicy" href="{{ route('conf') }}">Политика конфиденциальности</a> | 245 | <div class="footer__copy">© 2023 RentTorg</div><a class="footer__plicy" href="{{ route('conf') }}">Политика конфиденциальности</a> |
246 | </div> | 246 | </div> |
247 | </div> | 247 | </div> |
248 | </div> | 248 | </div> |
249 | </footer> | 249 | </footer> |
250 | </div> | 250 | </div> |
251 | 251 | ||
252 | <!-- Вплывающие окна --> | 252 | <!-- Вплывающие окна --> |
253 | <div class="popup popup-feedback" data-popup="feedback"> | 253 | <div class="popup popup-feedback" data-popup="feedback"> |
254 | <div class="popup__wrap"> | 254 | <div class="popup__wrap"> |
255 | <button class="popup__close js_popup_close" type="button"> | 255 | <button class="popup__close js_popup_close" type="button"> |
256 | <svg width="20" height="20"> | 256 | <svg width="20" height="20"> |
257 | <use xlink:href="{{ asset('images/sprite.svg#popup-close')}}"></use> | 257 | <use xlink:href="{{ asset('images/sprite.svg#popup-close')}}"></use> |
258 | </svg> | 258 | </svg> |
259 | </button> | 259 | </button> |
260 | <form class="popup-feedback__form js_popup_feedback_form" action="{{ route('header_form') }}" method="POST"> | 260 | <form class="popup-feedback__form js_popup_feedback_form" action="{{ route('header_form') }}" method="POST"> |
261 | @csrf | 261 | @csrf |
262 | <div class="popup-feedback__title">Как с вами связаться</div> | 262 | <div class="popup-feedback__title">Как с вами связаться</div> |
263 | <div class="popup-feedback__fields"> | 263 | <div class="popup-feedback__fields"> |
264 | <label class="popup-feedback__field field"> | 264 | <label class="popup-feedback__field field"> |
265 | <input type="text" placeholder="Имя" name="NameUser"> | 265 | <input type="text" placeholder="Имя" name="NameUser"> |
266 | </label> | 266 | </label> |
267 | <label class="popup-feedback__field field"> | 267 | <label class="popup-feedback__field field"> |
268 | <input class="js_input_phone" type="text" placeholder="Телефон" name="TelephoneUser"> | 268 | <input class="js_input_phone" type="text" placeholder="Телефон" name="TelephoneUser"> |
269 | </label> | 269 | </label> |
270 | </div> | 270 | </div> |
271 | <button class="popup-feedback__btn btn btn--main js_form_btn">Отправить</button> | 271 | <button class="popup-feedback__btn btn btn--main js_form_btn">Отправить</button> |
272 | <p class="popup-feedback__confirm">Нажимая на кнопку «Отправить», Вы даете согласие на обработку персональных данных в соответствии с <a href="{{ route('conf') }}">Политикой конфиденциальности</a>.</p> | 272 | <p class="popup-feedback__confirm">Нажимая на кнопку «Отправить», Вы даете согласие на обработку персональных данных в соответствии с <a href="{{ route('conf') }}">Политикой конфиденциальности</a>.</p> |
273 | </form> | 273 | </form> |
274 | </div> | 274 | </div> |
275 | </div> | 275 | </div> |
276 | <div class="popup popup-feedback" data-popup="viewing"> | 276 | <div class="popup popup-feedback" data-popup="viewing"> |
277 | <div class="popup__wrap"> | 277 | <div class="popup__wrap"> |
278 | <button class="popup__close js_popup_close" type="button"> | 278 | <button class="popup__close js_popup_close" type="button"> |
279 | <svg width="20" height="20"> | 279 | <svg width="20" height="20"> |
280 | <use xlink:href="{{ asset('images/sprite.svg#popup-close')}}"></use> | 280 | <use xlink:href="{{ asset('images/sprite.svg#popup-close')}}"></use> |
281 | </svg> | 281 | </svg> |
282 | </button> | 282 | </button> |
283 | <form class="popup-feedback__form js_popup_viewing_form" action="{{ route('rec_view_form') }}" method="POST"> | 283 | <form class="popup-feedback__form js_popup_viewing_form" action="{{ route('rec_view_form') }}" method="POST"> |
284 | @csrf | 284 | @csrf |
285 | <div class="popup-feedback__title">Записаться на просмотр</div> | 285 | <div class="popup-feedback__title">Записаться на просмотр</div> |
286 | <div class="popup-feedback__fields"> | 286 | <div class="popup-feedback__fields"> |
287 | <label class="popup-feedback__field field"> | 287 | <label class="popup-feedback__field field"> |
288 | <input type="text" placeholder="Имя" name="NameUser"> | 288 | <input type="text" placeholder="Имя" name="NameUser"> |
289 | </label> | 289 | </label> |
290 | <label class="popup-feedback__field field"> | 290 | <label class="popup-feedback__field field"> |
291 | <input class="js_input_phone" type="text" placeholder="Телефон" name="TelephoneUser"> | 291 | <input class="js_input_phone" type="text" placeholder="Телефон" name="TelephoneUser"> |
292 | </label> | 292 | </label> |
293 | </div> | 293 | </div> |
294 | <button class="popup-feedback__btn btn btn--main js_form_btn">Отправить</button> | 294 | <button class="popup-feedback__btn btn btn--main js_form_btn">Отправить</button> |
295 | <p class="popup-feedback__confirm">Нажимая на кнопку «Отправить», Вы даете согласие на обработку персональных данных в соответствии с <a href="#">Политикой конфиденциальности</a>.</p> | 295 | <p class="popup-feedback__confirm">Нажимая на кнопку «Отправить», Вы даете согласие на обработку персональных данных в соответствии с <a href="#">Политикой конфиденциальности</a>.</p> |
296 | </form> | 296 | </form> |
297 | </div> | 297 | </div> |
298 | </div> | 298 | </div> |
299 | <div class="popup popup-success" data-popup="success"> | 299 | <div class="popup popup-success" data-popup="success"> |
300 | <div class="popup__wrap"> | 300 | <div class="popup__wrap"> |
301 | <button class="popup__close js_popup_close" type="button"> | 301 | <button class="popup__close js_popup_close" type="button"> |
302 | <svg width="20" height="20"> | 302 | <svg width="20" height="20"> |
303 | <use xlink:href="{{ asset('images/sprite.svg#popup-close') }}"></use> | 303 | <use xlink:href="{{ asset('images/sprite.svg#popup-close') }}"></use> |
304 | </svg> | 304 | </svg> |
305 | </button> | 305 | </button> |
306 | <div class="popup-success__inner"> | 306 | <div class="popup-success__inner"> |
307 | <div class="popup-success__logo"> | 307 | <div class="popup-success__logo"> |
308 | <svg width="48" height="39"> | 308 | <svg width="48" height="39"> |
309 | <use xlink:href="{{ asset('images/sprite.svg#popup-success-logo')}}"></use> | 309 | <use xlink:href="{{ asset('images/sprite.svg#popup-success-logo')}}"></use> |
310 | </svg> | 310 | </svg> |
311 | </div> | 311 | </div> |
312 | <div class="popup-success__title">Спасибо за заявку</div> | 312 | <div class="popup-success__title">Спасибо за заявку</div> |
313 | <p class="popup-success__descr">В ближайшее время с вами свяжется наш специалист для уточнения деталей вашей задачи.</p> | 313 | <p class="popup-success__descr">В ближайшее время с вами свяжется наш специалист для уточнения деталей вашей задачи.</p> |
314 | </div> | 314 | </div> |
315 | </div> | 315 | </div> |
316 | </div> | 316 | </div> |
317 | <div class="popup popup-feedback" data-popup="sending"> | 317 | <div class="popup popup-feedback" data-popup="sending"> |
318 | <div class="popup__wrap"> | 318 | <div class="popup__wrap"> |
319 | <button class="popup__close js_popup_close" type="button"> | 319 | <button class="popup__close js_popup_close" type="button"> |
320 | <svg width="20" height="20"> | 320 | <svg width="20" height="20"> |
321 | <use xlink:href="{{ asset('images/sprite.svg#popup-close')}}"></use> | 321 | <use xlink:href="{{ asset('images/sprite.svg#popup-close')}}"></use> |
322 | </svg> | 322 | </svg> |
323 | </button> | 323 | </button> |
324 | <form class="popup-feedback__form js_popup_sending_form" action="{{ route('email_form') }}" method="POST"> | 324 | <form class="popup-feedback__form js_popup_sending_form" action="{{ route('email_form') }}" method="POST"> |
325 | @csrf | 325 | @csrf |
326 | <div class="popup-feedback__title">Отправить на почту</div> | 326 | <div class="popup-feedback__title">Отправить на почту</div> |
327 | <div class="popup-feedback__fields"> | 327 | <div class="popup-feedback__fields"> |
328 | <label class="popup-feedback__field field"> | 328 | <label class="popup-feedback__field field"> |
329 | <input class="js_input_email" type="text" placeholder="Электронная почта" name="EmailUser"> | 329 | <input class="js_input_email" type="text" placeholder="Электронная почта" name="EmailUser"> |
330 | </label> | 330 | </label> |
331 | </div> | 331 | </div> |
332 | <button class="popup-feedback__btn btn btn--main js_form_btn">Отправить</button> | 332 | <button class="popup-feedback__btn btn btn--main js_form_btn">Отправить</button> |
333 | <p class="popup-feedback__confirm">Нажимая на кнопку «Отправить», Вы даете согласие на обработку персональных данных в соответствии с <a href="{{ route('conf') }}">Политикой конфиденциальности</a>.</p> | 333 | <p class="popup-feedback__confirm">Нажимая на кнопку «Отправить», Вы даете согласие на обработку персональных данных в соответствии с <a href="{{ route('conf') }}">Политикой конфиденциальности</a>.</p> |
334 | </form> | 334 | </form> |
335 | </div> | 335 | </div> |
336 | </div> | 336 | </div> |
337 | <div class="contact-us js_contact_us"> | 337 | <div class="contact-us js_contact_us"> |
338 | <div class="contact-us__top"> | 338 | <div class="contact-us__top"> |
339 | <button class="contact-us__close js_contact_us_close" type="button"> | 339 | <button class="contact-us__close js_contact_us_close" type="button"> |
340 | <svg width="20" height="20"> | 340 | <svg width="20" height="20"> |
341 | <use xlink:href="{{ asset('images/sprite.svg#popup-close')}}"></use> | 341 | <use xlink:href="{{ asset('images/sprite.svg#popup-close')}}"></use> |
342 | </svg> | 342 | </svg> |
343 | </button> | 343 | </button> |
344 | <div class="contact-us__title">Свяжитесь с нами</div> | 344 | <div class="contact-us__title">Свяжитесь с нами</div> |
345 | </div> | 345 | </div> |
346 | <div class="contact-us__body"> | 346 | <div class="contact-us__body"> |
347 | <div class="contact-us__items"><a class="contact-us-item js_contact_us_close" data-btn="feedback"> | 347 | <div class="contact-us__items"><a class="contact-us-item js_contact_us_close" data-btn="feedback"> |
348 | <div class="contact-us-item__icon"> | 348 | <div class="contact-us-item__icon"> |
349 | <svg width="34" height="34"> | 349 | <svg width="34" height="34"> |
350 | <use xlink:href="{{ asset('images/sprite.svg#contact-us-phone')}}"></use> | 350 | <use xlink:href="{{ asset('images/sprite.svg#contact-us-phone')}}"></use> |
351 | </svg> | 351 | </svg> |
352 | </div> | 352 | </div> |
353 | <div class="contact-us-item__name">Позвонить</div></a> | 353 | <div class="contact-us-item__name">Позвонить</div></a> |
354 | 354 | ||
355 | <a class="contact-us-item js_contact_us_close" data-btn="sending"> | 355 | <a class="contact-us-item js_contact_us_close" data-btn="sending"> |
356 | <div class="contact-us-item__icon"> | 356 | <div class="contact-us-item__icon"> |
357 | <svg width="44" height="44"> | 357 | <svg width="44" height="44"> |
358 | <use xlink:href="{{ asset('images/sprite.svg#contact-us-email')}}"></use> | 358 | <use xlink:href="{{ asset('images/sprite.svg#contact-us-email')}}"></use> |
359 | </svg> | 359 | </svg> |
360 | </div> | 360 | </div> |
361 | <div class="contact-us-item__name">Написать</div></a> | 361 | <div class="contact-us-item__name">Написать</div></a> |
362 | 362 | ||
363 | <a class="contact-us-item js_contact_us_close" > | 363 | <a class="contact-us-item js_contact_us_close" > |
364 | <div class="contact-us-item__icon"> | 364 | <div class="contact-us-item__icon"> |
365 | <svg width="34" height="34"> | 365 | <svg width="34" height="34"> |
366 | <use xlink:href="{{ asset('images/sprite.svg#contact-us-chat')}}"></use> | 366 | <use xlink:href="{{ asset('images/sprite.svg#contact-us-chat')}}"></use> |
367 | </svg> | 367 | </svg> |
368 | </div> | 368 | </div> |
369 | <div class="contact-us-item__name">Онлайн-чат</div></a></div> | 369 | <div class="contact-us-item__name">Онлайн-чат</div></a></div> |
370 | <div class="contact-us__socials"><a class="contact-us-social js_contact_us_close" href="#" target="_blank"> | 370 | <div class="contact-us__socials"><a class="contact-us-social js_contact_us_close" href="#" target="_blank"> |
371 | <div class="contact-us-social__icon contact-us-social__icon-tg"><img src="{{ asset('images/contact-us-tg.svg')}}" alt=""></div> | 371 | <div class="contact-us-social__icon contact-us-social__icon-tg"><img src="{{ asset('images/contact-us-tg.svg')}}" alt=""></div> |
372 | <div class="contact-us-social__name">Telegram</div></a><a class="contact-us-social js_contact_us_close" href="#" target="_blank"> | 372 | <div class="contact-us-social__name">Telegram</div></a><a class="contact-us-social js_contact_us_close" href="#" target="_blank"> |
373 | <div class="contact-us-social__icon contact-us-social__icon-wa"> | 373 | <div class="contact-us-social__icon contact-us-social__icon-wa"> |
374 | <svg width="31" height="31"> | 374 | <svg width="31" height="31"> |
375 | <use xlink:href="{{ asset('images/sprite.svg#contact-us-wa')}}"></use> | 375 | <use xlink:href="{{ asset('images/sprite.svg#contact-us-wa')}}"></use> |
376 | </svg> | 376 | </svg> |
377 | </div> | 377 | </div> |
378 | <div class="contact-us-social__name">WhatsApp</div></a></div> | 378 | <div class="contact-us-social__name">WhatsApp</div></a></div> |
379 | </div> | 379 | </div> |
380 | </div> | 380 | </div> |
381 | <div class="offer-side-popup" data-popup="offer-side-popup"> | 381 | <div class="offer-side-popup" data-popup="offer-side-popup"> |
382 | <div class="offer-side-popup__wrap"> | 382 | <div class="offer-side-popup__wrap"> |
383 | <button class="offer-side-popup__close js_popup_close" type="button"> | 383 | <button class="offer-side-popup__close js_popup_close" type="button"> |
384 | <svg width="20" height="20"> | 384 | <svg width="20" height="20"> |
385 | <use xlink:href="{{ asset('images/sprite.svg#popup-close')}}"></use> | 385 | <use xlink:href="{{ asset('images/sprite.svg#popup-close')}}"></use> |
386 | </svg> | 386 | </svg> |
387 | </button> | 387 | </button> |
388 | <div class="offer-side-popup__cnt"> | 388 | <div class="offer-side-popup__cnt"> |
389 | <div class="offer-side-popup__item js_offer_side_popup_item active" data-item="1"><img src="{{ asset('images/offer-side-item-img-1.jpg')}}" alt="План объекта"></div> | 389 | <div class="offer-side-popup__item js_offer_side_popup_item active" data-item="1"><img src="{{ asset('images/offer-side-item-img-1.jpg')}}" alt="План объекта"></div> |
390 | <div class="offer-side-popup__item js_offer_side_popup_item" data-item="2"><img src="{{ asset('images/offer-side-item-img-2.jpg')}}" alt="План этажа"></div> | 390 | <div class="offer-side-popup__item js_offer_side_popup_item" data-item="2"><img src="{{ asset('images/offer-side-item-img-2.jpg')}}" alt="План этажа"></div> |
391 | </div> | 391 | </div> |
392 | <div class="offer-side-popup__tabs"> | 392 | <div class="offer-side-popup__tabs"> |
393 | <button class="offer-side-popup__tab js_offer_side_popup_tab active" type="button" data-tab="1">План объекта</button> | 393 | <button class="offer-side-popup__tab js_offer_side_popup_tab active" type="button" data-tab="1">План объекта</button> |
394 | <button class="offer-side-popup__tab js_offer_side_popup_tab" type="button" data-tab="2">План этажа</button> | 394 | <button class="offer-side-popup__tab js_offer_side_popup_tab" type="button" data-tab="2">План этажа</button> |
395 | </div> | 395 | </div> |
396 | <button class="offer-side-popup__sizeoff js_popup_close" type="button"> | 396 | <button class="offer-side-popup__sizeoff js_popup_close" type="button"> |
397 | <svg width="18" height="18"> | 397 | <svg width="18" height="18"> |
398 | <use xlink:href="{{ asset('images/sprite.svg#popup-sizeoff')}}"></use> | 398 | <use xlink:href="{{ asset('images/sprite.svg#popup-sizeoff')}}"></use> |
399 | </svg> | 399 | </svg> |
400 | </button> | 400 | </button> |
401 | </div> | 401 | </div> |
402 | </div> | 402 | </div> |
403 | <div class="img-viewer js_img_viewer"> | 403 | <div class="img-viewer js_img_viewer"> |
404 | <div class="img-viewer__wrap"> | 404 | <div class="img-viewer__wrap"> |
405 | <button class="img-viewer__close js_img_viewer_close" type="button"> | 405 | <button class="img-viewer__close js_img_viewer_close" type="button"> |
406 | <svg width="20" height="20"> | 406 | <svg width="20" height="20"> |
407 | <use xlink:href="{{ asset('images/sprite.svg#popup-close')}}"></use> | 407 | <use xlink:href="{{ asset('images/sprite.svg#popup-close')}}"></use> |
408 | </svg> | 408 | </svg> |
409 | </button> | 409 | </button> |
410 | <div class="img-viewer__thumbs js_img_viewer_thumbs"> | 410 | <div class="img-viewer__thumbs js_img_viewer_thumbs"> |
411 | <div class="img-viewer__thumbs-swiper js_img_viewer_thumbs_swiper swiper"> | 411 | <div class="img-viewer__thumbs-swiper js_img_viewer_thumbs_swiper swiper"> |
412 | <div class="swiper-wrapper"></div> | 412 | <div class="swiper-wrapper"></div> |
413 | </div> | 413 | </div> |
414 | </div> | 414 | </div> |
415 | <div class="img-viewer__slider"> | 415 | <div class="img-viewer__slider"> |
416 | <div class="img-viewer__slider-swiper js_img_viewer_slider_swiper swiper"> | 416 | <div class="img-viewer__slider-swiper js_img_viewer_slider_swiper swiper"> |
417 | <div class="swiper-wrapper"></div> | 417 | <div class="swiper-wrapper"></div> |
418 | </div> | 418 | </div> |
419 | <div class="swiper-button-prev"> | 419 | <div class="swiper-button-prev"> |
420 | <svg width="10" height="17"> | 420 | <svg width="10" height="17"> |
421 | <use xlink:href="{{ asset('images/sprite.svg#slider-arrow')}}"></use> | 421 | <use xlink:href="{{ asset('images/sprite.svg#slider-arrow')}}"></use> |
422 | </svg> | 422 | </svg> |
423 | </div> | 423 | </div> |
424 | <div class="swiper-button-next"> | 424 | <div class="swiper-button-next"> |
425 | <svg width="10" height="17"> | 425 | <svg width="10" height="17"> |
426 | <use xlink:href="{{ asset('images/sprite.svg#slider-arrow')}}"></use> | 426 | <use xlink:href="{{ asset('images/sprite.svg#slider-arrow')}}"></use> |
427 | </svg> | 427 | </svg> |
428 | </div> | 428 | </div> |
429 | </div> | 429 | </div> |
430 | <div class="img-viewer__caption js_img_viewer_caption"></div> | 430 | <div class="img-viewer__caption js_img_viewer_caption"></div> |
431 | <button class="img-viewer__sizeoff js_img_viewer_close" type="button"> | 431 | <button class="img-viewer__sizeoff js_img_viewer_close" type="button"> |
432 | <svg width="18" height="18"> | 432 | <svg width="18" height="18"> |
433 | <use xlink:href="{{ asset('images/sprite.svg#popup-sizeoff') }}"></use> | 433 | <use xlink:href="{{ asset('images/sprite.svg#popup-sizeoff') }}"></use> |
434 | </svg> | 434 | </svg> |
435 | </button> | 435 | </button> |
436 | </div> | 436 | </div> |
437 | </div> | 437 | </div> |
438 | <div class="cookies js_cookies"> | 438 | <div class="cookies js_cookies"> |
439 | <div class="container"> | 439 | <div class="container"> |
440 | <div class="cookies__wrap"> | 440 | <div class="cookies__wrap"> |
441 | <div class="cookies__top"> | 441 | <div class="cookies__top"> |
442 | <div class="cookies__img"><img src="{{ asset('images/cookies.svg') }}" alt="cookies"></div> | 442 | <div class="cookies__img"><img src="{{ asset('images/cookies.svg') }}" alt="cookies"></div> |
443 | <div class="cookies__title">Cookies</div> | 443 | <div class="cookies__title">Cookies</div> |
444 | </div> | 444 | </div> |
445 | <p class="cookies__descr">Мы используем cookie-файлы для наилучшего представления нашего сайта.<br>Продолжая использовать сайт, вы даете согласие с использованием cookie-файлов.</p> | 445 | <p class="cookies__descr">Мы используем cookie-файлы для наилучшего представления нашего сайта.<br>Продолжая использовать сайт, вы даете согласие с использованием cookie-файлов.</p> |
446 | <div class="cookies__buttons"> | 446 | <div class="cookies__buttons"> |
447 | <button class="cookies__btn btn btn--main js_cookies_confirm" type="button">Принять</button><a class="cookies__link" href="{{ route('cookies') }}">Подробнее</a> | 447 | <button class="cookies__btn btn btn--main js_cookies_confirm" type="button">Принять</button><a class="cookies__link" href="{{ route('cookies') }}">Подробнее</a> |
448 | </div> | 448 | </div> |
449 | </div> | 449 | </div> |
450 | </div> | 450 | </div> |
451 | </div> | 451 | </div> |
452 | <script src="https://api-maps.yandex.ru/2.1/?lang=ru_RU"></script> | 452 | <script src="https://api-maps.yandex.ru/2.1/?lang=ru_RU"></script> |
453 | <script src="{{ asset('js/swiper-bundle.min.js') }}"></script> | 453 | <script src="{{ asset('js/swiper-bundle.min.js') }}"></script> |
454 | <script src="{{ asset('js/main.js') }}"></script> | 454 | <script src="{{ asset('js/main.js') }}"></script> |
455 | <script type="text/javascript" src="{{ asset('js/jquery.min.js') }}"></script> | 455 | <script type="text/javascript" src="{{ asset('js/jquery.min.js') }}"></script> |
456 | <script type="text/javascript" src="{{ asset('js/jquery.cookie.js') }}"></script> | 456 | <script type="text/javascript" src="{{ asset('js/jquery.cookie.js') }}"></script> |
457 | @yield('custom_js') | 457 | @yield('custom_js') |
458 | @include('js.cookies_favorite') | 458 | @include('js.cookies_favorite') |
459 | </body> | 459 | </body> |
460 | </html> | 460 | </html> |
461 | 461 |
routes/web.php
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 | use App\Http\Controllers\Admin\AreaController; | 9 | use App\Http\Controllers\Admin\AreaController; |
10 | use App\Http\Controllers\Admin\NewsController; | ||
11 | use App\Http\Controllers\Admin\CompanyAreaController; | ||
12 | use App\Http\Controllers\Admin\FormatAreaController; | ||
13 | use App\Http\Controllers\Admin\TypeAreaController; | ||
14 | use App\Http\Controllers\Admin\HousesController; | ||
15 | use App\Http\Controllers\Admin\MessageAreaController; | ||
10 | 16 | ||
11 | /* | 17 | /* |
12 | |-------------------------------------------------------------------------- | 18 | |-------------------------------------------------------------------------- |
13 | | Web Routes | 19 | | Web Routes |
14 | |-------------------------------------------------------------------------- | 20 | |-------------------------------------------------------------------------- |
15 | | | 21 | | |
16 | | Here is where you can register web routes for your application. These | 22 | | Here is where you can register web routes for your application. These |
17 | | routes are loaded by the RouteServiceProvider within a group which | 23 | | routes are loaded by the RouteServiceProvider within a group which |
18 | | contains the "web" middleware group. Now create something great! | 24 | | contains the "web" middleware group. Now create something great! |
19 | | | 25 | | |
20 | */ | 26 | */ |
21 | 27 | ||
22 | //Главная страница | 28 | //Главная страница |
23 | Route::get('/',[MainController::class, 'index'])->name('index'); | 29 | Route::get('/',[MainController::class, 'index'])->name('index'); |
24 | 30 | ||
25 | //Страница Избранные | 31 | //Страница Избранные |
26 | Route::get('favorite',[MainController::class, 'favorite'])->name('favorite'); | 32 | Route::get('favorite',[MainController::class, 'favorite'])->name('favorite'); |
27 | 33 | ||
28 | //Страница контакты | 34 | //Страница контакты |
29 | Route::get('contact',[MainController::class, 'contact'])->name('contact'); | 35 | Route::get('contact',[MainController::class, 'contact'])->name('contact'); |
30 | 36 | ||
31 | //Страница каталог | 37 | //Страница каталог |
32 | Route::get('catalog',[MainController::class, 'catalog'])->name('catalog'); | 38 | Route::get('catalog',[MainController::class, 'catalog'])->name('catalog'); |
33 | 39 | ||
34 | //Страница новости | 40 | //Страница новости |
35 | Route::get('news',[MainController::class, 'news'])->name('news'); | 41 | Route::get('news',[MainController::class, 'news'])->name('news'); |
36 | 42 | ||
37 | //Страница о компании | 43 | //Страница о компании |
38 | Route::get('about',[MainController::class, 'about'])->name('about'); | 44 | Route::get('about',[MainController::class, 'about'])->name('about'); |
39 | 45 | ||
40 | //Страница объекты на карте | 46 | //Страница объекты на карте |
41 | Route::get('maps',[MainController::class, 'mapsobj'])->name('maps'); | 47 | Route::get('maps',[MainController::class, 'mapsobj'])->name('maps'); |
42 | 48 | ||
43 | // Политика конфедициальности | 49 | // Политика конфедициальности |
44 | Route::get('conf', function () { | 50 | Route::get('conf', function () { |
45 | return view('conf'); | 51 | return view('conf'); |
46 | })->name('conf'); | 52 | })->name('conf'); |
47 | 53 | ||
48 | //Детальная страница предложения недвижимости | 54 | //Детальная страница предложения недвижимости |
49 | Route::get('offer/{house:id}', [MainController::class, 'offer'])->name('offer'); | 55 | Route::get('offer/{house:id}', [MainController::class, 'offer'])->name('offer'); |
50 | 56 | ||
51 | //Детальная страница новостей | 57 | //Детальная страница новостей |
52 | Route::get('detail-new/{news:id}', [MainController::class, 'DetailNew'])->name('new'); | 58 | Route::get('detail-new/{news:id}', [MainController::class, 'DetailNew'])->name('new'); |
53 | 59 | ||
54 | //Страница ЖилойКомплекс | 60 | //Страница ЖилойКомплекс |
55 | Route::get('complex/{area:id}', [MainController::class, 'complex'])->name('complex'); | 61 | Route::get('complex/{area:id}', [MainController::class, 'complex'])->name('complex'); |
56 | 62 | ||
57 | // ajax-фильтры каталога | 63 | // ajax-фильтры каталога |
58 | Route::get('catalog_ajax_filter', [MainController::class, 'catalog_ajax_filter'])->name('catalog_ajax_filter'); | 64 | Route::get('catalog_ajax_filter', [MainController::class, 'catalog_ajax_filter'])->name('catalog_ajax_filter'); |
59 | 65 | ||
60 | //Категория | 66 | //Категория |
61 | Route::get('category/{cat}', [MainController::class, 'Category'])->name('category'); | 67 | Route::get('category/{cat}', [MainController::class, 'Category'])->name('category'); |
62 | 68 | ||
63 | //Категория ajax | 69 | //Категория ajax |
64 | Route::get('category_ajax/{cat}', [MainController::class, 'category_ajax'])->name('category_ajax'); | 70 | Route::get('category_ajax/{cat}', [MainController::class, 'category_ajax'])->name('category_ajax'); |
65 | 71 | ||
66 | //Страница куков | 72 | //Страница куков |
67 | Route::get('cookies', function () { | 73 | Route::get('cookies', function () { |
68 | return view('cookies'); | 74 | return view('cookies'); |
69 | })->name('cookies'); | 75 | })->name('cookies'); |
70 | 76 | ||
71 | //Форма обратной связи в футере | 77 | //Форма обратной связи в футере |
72 | Route::post('main_form', [MainController::class, 'main_form'])->name('main_form'); | 78 | Route::post('main_form', [MainController::class, 'main_form'])->name('main_form'); |
73 | 79 | ||
74 | //Форма обратной связи в хедере | 80 | //Форма обратной связи в хедере |
75 | Route::post('header_form', [MainController::class, 'header_form'])->name('header_form'); | 81 | Route::post('header_form', [MainController::class, 'header_form'])->name('header_form'); |
76 | 82 | ||
77 | //Форма записаться на просмотр в карточке офиса | 83 | //Форма записаться на просмотр в карточке офиса |
78 | Route::post('rec_view_form', [MainController::class, 'rec_view_form'])->name('rec_view_form'); | 84 | Route::post('rec_view_form', [MainController::class, 'rec_view_form'])->name('rec_view_form'); |
79 | 85 | ||
80 | //Форма обратной связи на странице контакты | 86 | //Форма обратной связи на странице контакты |
81 | Route::post('page_contact_form', [MainController::class, 'page_contact_form'])->name('page_contact_form'); | 87 | Route::post('page_contact_form', [MainController::class, 'page_contact_form'])->name('page_contact_form'); |
82 | 88 | ||
83 | //Форма обратной связи предложения по почте | 89 | //Форма обратной связи предложения по почте |
84 | Route::post('email_form', [MainController::class, 'email_form'])->name('email_form'); | 90 | Route::post('email_form', [MainController::class, 'email_form'])->name('email_form'); |
85 | 91 | ||
86 | Route::group([ | 92 | Route::group([ |
87 | 'as' => 'auth.', // имя маршрута, например auth.index | 93 | 'as' => 'auth.', // имя маршрута, например auth.index |
88 | 'prefix' => 'auth', // префикс маршрута, например auth/index | 94 | 'prefix' => 'auth', // префикс маршрута, например auth/index |
89 | ], function () { | 95 | ], function () { |
90 | // Форма регистрации | 96 | // Форма регистрации |
91 | Route::get('register', [RegisterController::class, 'register'])->name('register'); | 97 | Route::get('register', [RegisterController::class, 'register'])->name('register'); |
92 | 98 | ||
93 | // Создание пользователя | 99 | // Создание пользователя |
94 | Route::post('register', [RegisterController::class, 'create'])->name('create'); | 100 | Route::post('register', [RegisterController::class, 'create'])->name('create'); |
95 | //Форма входа | 101 | //Форма входа |
96 | Route::get('login', [LoginController::class, 'login'])->name('login'); | 102 | Route::get('login', [LoginController::class, 'login'])->name('login'); |
97 | 103 | ||
98 | // аутентификация | 104 | // аутентификация |
99 | Route::post('login', [LoginController::class, 'autenticate'])->name('auth'); | 105 | Route::post('login', [LoginController::class, 'autenticate'])->name('auth'); |
100 | 106 | ||
101 | // выход | 107 | // выход |
102 | Route::get('logout', [LoginController::class, 'logout'])->name('logout'); | 108 | Route::get('logout', [LoginController::class, 'logout'])->name('logout'); |
103 | 109 | ||
104 | //Страница неудачной авторизации | 110 | //Страница неудачной авторизации |
105 | Route::get('vefiry-message', function () { | 111 | Route::get('vefiry-message', function () { |
106 | return view('auth.vefiry-message'); | 112 | return view('auth.vefiry-message'); |
107 | })->name('vefiry-message'); | 113 | })->name('vefiry-message'); |
108 | 114 | ||
109 | }); | 115 | }); |
110 | 116 | ||
111 | /* | 117 | /* |
112 | * Личный кабинет пользователя | 118 | * Личный кабинет пользователя |
113 | */ | 119 | */ |
114 | Route::group([ | 120 | Route::group([ |
115 | 'as' => 'user.', // имя маршрута, например user.index | 121 | 'as' => 'user.', // имя маршрута, например user.index |
116 | 'prefix' => 'user', // префикс маршрута, например user/index | 122 | 'prefix' => 'user', // префикс маршрута, например user/index |
117 | //'namespace' => 'User', // пространство имен контроллеров | 123 | //'namespace' => 'User', // пространство имен контроллеров |
118 | 'middleware' => ['auth'] // один или несколько посредников | 124 | 'middleware' => ['auth'] // один или несколько посредников |
119 | ], function () { | 125 | ], function () { |
120 | // главная страница | 126 | // главная страница |
121 | Route::get('index', [AdminController::class, 'index'])->name('index'); | 127 | Route::get('index', [AdminController::class, 'index'])->name('index'); |
122 | }); | 128 | }); |
123 | 129 | ||
124 | /* | 130 | /* |
125 | * Панель управления: CRUD-операции над постами, категориями, тегами | 131 | * Панель управления: CRUD-операции над постами, категориями, тегами |
126 | */ | 132 | */ |
127 | Route::group([ | 133 | Route::group([ |
128 | 'as' => 'admin.', // имя маршрута, например admin.index | 134 | 'as' => 'admin.', // имя маршрута, например admin.index |
129 | 'prefix' => 'admin', // префикс маршрута, например admin/index | 135 | 'prefix' => 'admin', // префикс маршрута, например admin/index |
130 | //'namespace' => 'Admin', // пространство имен контроллеров | 136 | //'namespace' => 'Admin', // пространство имен контроллеров |
131 | 'middleware' => ['auth'] // один или несколько посредников | 137 | 'middleware' => ['auth'] // один или несколько посредников |
132 | ], function () { | 138 | ], function () { |
133 | /* | 139 | /* |
134 | * CRUD-операции над постами Жилых комплексов | 140 | * CRUD-операции над постами Жилых комплексов |
135 | */ | 141 | */ |
136 | Route::resource('area', AreaController::class, []); | 142 | Route::resource('area', AreaController::class, []); |
137 | 143 | ||
138 | //дополнительный маршрут для показа постов с жилыми массивами | 144 | //дополнительный маршрут для показа картинок объектов недвижимости |
139 | Route::get('post/area/{area}', [AreaController::class, 'area_category']) | 145 | Route::get('img/area/{area}', [AreaController::class, 'area_category']) |
140 | ->name('post.area'); | 146 | ->name('img.area'); |
147 | |||
148 | //дополнительный маршрут для добавления картинок объектов недвижимости | ||
149 | Route::post('img/area/{area}', [AreaController::class, 'area_add_img']) | ||
150 | ->name('img.add.area'); | ||
151 | |||
152 | //дополнительный маршрут для удаления картинок объектов недвжимости | ||
153 | Route::get('img/del/{id}/area/{area}', [AreaController::class, 'area_del_img']) | ||
154 | ->name('img.del.area'); | ||
155 | |||
156 | /* | ||
157 | * CRUD-операции над постами Новости | ||
158 | */ | ||
159 | Route::resource('news', NewsController::class, []); | ||
160 | |||
161 | /* | ||
162 | * CRUD-операции над настройками Компании | ||
163 | */ | ||
164 | Route::resource('company', CompanyAreaController::class, ['except' => ['create', 'store', 'destroy', 'index']]); | ||
165 | |||
141 | }); | 166 | }); |
142 | 167 |