Commit d82a28f22a6edc5619d174c3442426bc8c459bea

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

Админка форматы и типы недвижимости, компания, офисы

Showing 27 changed files with 762 additions and 45 deletions Inline Diff

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