Commit 6eff6bf11b34d00d6952359357d9727fe5737383
1 parent
c5118e5f36
Exists in
master
Админка сайта категории, баннеры, новости, проекты
Showing 26 changed files with 777 additions and 30 deletions Inline Diff
- app/Http/Controllers/Admin/BannerController.php
- app/Http/Controllers/Admin/CategoryController.php
- app/Http/Controllers/Admin/NewsController.php
- app/Http/Controllers/Admin/ProjectController.php
- app/Http/Requests/CategoryRequest.php
- app/Models/Category.php
- app/Providers/ComposerServiceProvider.php
- config/app.php
- resources/views/admin/banners/create.blade.php
- resources/views/admin/banners/edit.blade.php
- resources/views/admin/banners/form.blade.php
- resources/views/admin/banners/index.blade.php
- resources/views/admin/category/create.blade.php
- resources/views/admin/category/edit.blade.php
- resources/views/admin/category/form.blade.php
- resources/views/admin/category/index.blade.php
- resources/views/admin/news/create.blade.php
- resources/views/admin/news/edit.blade.php
- resources/views/admin/news/form.blade.php
- resources/views/admin/news/index.blade.php
- resources/views/admin/part/parents.blade.php
- resources/views/admin/projects/create.blade.php
- resources/views/admin/projects/edit.blade.php
- resources/views/admin/projects/form.blade.php
- resources/views/admin/projects/index.blade.php
- resources/views/layout/admin.blade.php
app/Http/Controllers/Admin/BannerController.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\Banner; | 6 | use App\Models\Banner; |
7 | use Illuminate\Database\Eloquent\Model; | 7 | use Illuminate\Database\Eloquent\Model; |
8 | use Illuminate\Http\Request; | 8 | use Illuminate\Http\Request; |
9 | use Illuminate\Support\Facades\Storage; | 9 | use Illuminate\Support\Facades\Storage; |
10 | use Illuminate\Support\Facades\Validator; | 10 | use Illuminate\Support\Facades\Validator; |
11 | 11 | ||
12 | class BannerController extends Controller | 12 | class BannerController extends Controller |
13 | { | 13 | { |
14 | /** | 14 | /** |
15 | * Display a listing of the resource. | 15 | * Display a listing of the resource. |
16 | * | 16 | * |
17 | * @return \Illuminate\Http\Response | 17 | * @return \Illuminate\Http\Response |
18 | */ | 18 | */ |
19 | public function index() | 19 | public function index() |
20 | { | 20 | { |
21 | $banners = Banner::query()->orderBy('id')->paginate(5); | 21 | $banners = Banner::query()->orderBy('id')->paginate(5); |
22 | return view('admin.banners.index', compact('banners')); | 22 | return view('admin.banners.index', compact('banners')); |
23 | } | 23 | } |
24 | 24 | ||
25 | /** | 25 | /** |
26 | * Show the form for creating a new resource. | 26 | * Show the form for creating a new resource. |
27 | * | 27 | * |
28 | * @return \Illuminate\Http\Response | 28 | * @return \Illuminate\Http\Response |
29 | */ | 29 | */ |
30 | public function create() | 30 | public function create() |
31 | { | 31 | { |
32 | return view('admin.banners.create'); | 32 | return view('admin.banners.create'); |
33 | } | 33 | } |
34 | 34 | ||
35 | /** | 35 | /** |
36 | * Store a newly created resource in storage. | 36 | * Store a newly created resource in storage. |
37 | * | 37 | * |
38 | * @param \Illuminate\Http\Request $request | 38 | * @param \Illuminate\Http\Request $request |
39 | * @return \Illuminate\Http\Response | 39 | * @return \Illuminate\Http\Response |
40 | */ | 40 | */ |
41 | public function store(Request $request) | 41 | public function store(Request $request) |
42 | { | 42 | { |
43 | $rules = [ | 43 | $rules = [ |
44 | 'image' => 'required|min:3|max:10000', | 44 | 'image' => 'required|min:3|max:10000', |
45 | 'title' => 'required|min:3|max:255' | 45 | 'title' => 'required|min:3|max:255' |
46 | ]; | 46 | ]; |
47 | $messages = [ | 47 | $messages = [ |
48 | 'required' => 'Поле не может быть пустым!', | 48 | 'required' => 'Поле не может быть пустым!', |
49 | ]; | 49 | ]; |
50 | $validator = Validator::make($request->all(), $rules, $messages); | 50 | $validator = Validator::make($request->all(), $rules, $messages); |
51 | 51 | ||
52 | if ($validator->fails()) { | 52 | if ($validator->fails()) { |
53 | return redirect()->route('admin.banner.create') | 53 | return redirect()->route('admin.banner.create') |
54 | ->withErrors($validator); | 54 | ->withErrors($validator); |
55 | } else { | 55 | } else { |
56 | 56 | ||
57 | $banner = new Banner(); | 57 | $banner = new Banner(); |
58 | $banner->title = $request->title; | 58 | $banner->title = $request->title; |
59 | $banner->text = $request->text; | 59 | $banner->text = $request->text; |
60 | $banner->image = $request->file('image')->store('banners', 'public'); | 60 | $banner->image = $request->file('image')->store('banners', 'public'); |
61 | $banner->save(); | 61 | $banner->save(); |
62 | 62 | ||
63 | //$area->fotos()->save($foto_area); | 63 | //$area->fotos()->save($foto_area); |
64 | return redirect()->route('admin.banner.index'); | 64 | return redirect()->route('admin.banner.index'); |
65 | } | 65 | } |
66 | } | 66 | } |
67 | 67 | ||
68 | /** | 68 | /** |
69 | * Display the specified resource. | 69 | * Display the specified resource. |
70 | * | 70 | * |
71 | * @param \App\Models\Banner $banner | 71 | * @param \App\Models\Banner $banner |
72 | * @return \Illuminate\Http\Response | 72 | * @return \Illuminate\Http\Response |
73 | */ | 73 | */ |
74 | public function show(Banner $banner) | 74 | public function show(Banner $banner) |
75 | { | 75 | { |
76 | // | 76 | // |
77 | } | 77 | } |
78 | 78 | ||
79 | /** | 79 | /** |
80 | * Show the form for editing the specified resource. | 80 | * Show the form for editing the specified resource. |
81 | * | 81 | * |
82 | * @param \App\Models\Banner $banner | 82 | * @param \App\Models\Banner $banner |
83 | * @return \Illuminate\Http\Response | 83 | * @return \Illuminate\Http\Response |
84 | */ | 84 | */ |
85 | public function edit(Banner $banner) | 85 | public function edit(Banner $banner) |
86 | { | 86 | { |
87 | return view('admin.banners.edit', compact($banner)); | 87 | return view('admin.banners.edit', compact('banner')); |
88 | } | 88 | } |
89 | 89 | ||
90 | /** | 90 | /** |
91 | * Update the specified resource in storage. | 91 | * Update the specified resource in storage. |
92 | * | 92 | * |
93 | * @param \Illuminate\Http\Request $request | 93 | * @param \Illuminate\Http\Request $request |
94 | * @param \App\Models\Banner $banner | 94 | * @param \App\Models\Banner $banner |
95 | * @return \Illuminate\Http\Response | 95 | * @return \Illuminate\Http\Response |
96 | */ | 96 | */ |
97 | public function update(Request $request, Banner $banner) | 97 | public function update(Request $request, Banner $banner) |
98 | { | 98 | { |
99 | $rules = [ | 99 | $rules = [ |
100 | 'image' => 'required|min:3|max:10000', | ||
101 | 'title' => 'required|min:3|max:255' | 100 | 'title' => 'required|min:3|max:255' |
102 | ]; | 101 | ]; |
102 | |||
103 | if (empty($banner->image)) { | ||
104 | $rules['image'] = 'required|min:3|max:10000'; | ||
105 | } | ||
103 | $messages = [ | 106 | $messages = [ |
104 | 'required' => 'Поле не может быть пустым!', | 107 | 'required' => 'Поле не может быть пустым!', |
105 | ]; | 108 | ]; |
106 | $validator = Validator::make($request->all(), $rules, $messages); | 109 | $validator = Validator::make($request->all(), $rules, $messages); |
107 | 110 | ||
108 | if ($validator->fails()) { | 111 | if ($validator->fails()) { |
109 | return redirect()->route('admin.banner.edit') | 112 | return redirect()->route('admin.banner.edit', ['banner' => $banner->id]) |
110 | ->withErrors($validator); | 113 | ->withErrors($validator); |
111 | } else { | 114 | } else { |
112 | $params = $request->all(); | 115 | $params = $request->all(); |
113 | unset($params['image']); | 116 | unset($params['image']); |
114 | if ($request->has('image')) { | 117 | if ($request->has('image')) { |
115 | Storage::delete($banner->image); | 118 | Storage::delete($banner->image); |
116 | $params['image'] = $request->file('image')->store('banners', 'public'); | 119 | $params['image'] = $request->file('image')->store('banners', 'public'); |
117 | } | 120 | } |
118 | 121 | ||
119 | $banner->update($params); | 122 | $banner->update($params); |
120 | return redirect()->route('admin.banner.index'); | 123 | return redirect()->route('admin.banner.index'); |
121 | } | 124 | } |
122 | } | 125 | } |
123 | 126 | ||
124 | /** | 127 | /** |
125 | * Remove the specified resource from storage. | 128 | * Remove the specified resource from storage. |
126 | * | 129 | * |
127 | * @param \App\Models\Banner $banner | 130 | * @param \App\Models\Banner $banner |
128 | * @return \Illuminate\Http\Response | 131 | * @return \Illuminate\Http\Response |
129 | */ | 132 | */ |
130 | public function destroy(Banner $banner) | 133 | public function destroy(Banner $banner) |
131 | { | 134 | { |
132 | if (!empty($banner->image)) { | 135 | if (!empty($banner->image)) { |
133 | Storage::delete($banner->image); | 136 | Storage::delete($banner->image); |
134 | } | 137 | } |
135 | $image->delete(); | 138 | $banner->delete(); |
136 | return redirect()->route('admin.banner.index'); | 139 | return redirect()->route('admin.banner.index'); |
137 | } | 140 | } |
138 | } | 141 | } |
app/Http/Controllers/Admin/CategoryController.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\CategoryRequest; | ||
6 | use App\Models\Category; | 7 | use App\Models\Category; |
7 | use Illuminate\Http\Request; | 8 | use Illuminate\Http\Request; |
9 | use Illuminate\Support\Facades\Storage; | ||
8 | 10 | ||
9 | class CategoryController extends Controller | 11 | class CategoryController 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 | $categories = Category::query()->orderBy('id')->paginate(5); |
21 | return view('admin.category.index', compact('categories')); | ||
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.category.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(CategoryRequest $request) |
38 | { | 41 | { |
39 | // | 42 | $params = $request->all(); |
43 | |||
44 | if ($request->has('image')) { | ||
45 | $params['image'] = $request->file('image')->store('category', 'public'); | ||
46 | } | ||
47 | |||
48 | Category::create($params); | ||
49 | return redirect()->route('admin.category.index'); | ||
40 | } | 50 | } |
41 | 51 | ||
42 | /** | 52 | /** |
43 | * Display the specified resource. | 53 | * Display the specified resource. |
44 | * | 54 | * |
45 | * @param \App\Models\Category $category | 55 | * @param \App\Models\Category $category |
46 | * @return \Illuminate\Http\Response | 56 | * @return \Illuminate\Http\Response |
47 | */ | 57 | */ |
48 | public function show(Category $category) | 58 | public function show(Category $category) |
49 | { | 59 | { |
50 | // | 60 | // |
51 | } | 61 | } |
52 | 62 | ||
53 | /** | 63 | /** |
54 | * Show the form for editing the specified resource. | 64 | * Show the form for editing the specified resource. |
55 | * | 65 | * |
56 | * @param \App\Models\Category $category | 66 | * @param \App\Models\Category $category |
57 | * @return \Illuminate\Http\Response | 67 | * @return \Illuminate\Http\Response |
58 | */ | 68 | */ |
59 | public function edit(Category $category) | 69 | public function edit(Category $category) |
60 | { | 70 | { |
61 | // | 71 | return view('admin.category.edit', compact('category')); |
62 | } | 72 | } |
63 | 73 | ||
64 | /** | 74 | /** |
65 | * Update the specified resource in storage. | 75 | * Update the specified resource in storage. |
66 | * | 76 | * |
67 | * @param \Illuminate\Http\Request $request | 77 | * @param \Illuminate\Http\Request $request |
68 | * @param \App\Models\Category $category | 78 | * @param \App\Models\Category $category |
69 | * @return \Illuminate\Http\Response | 79 | * @return \Illuminate\Http\Response |
70 | */ | 80 | */ |
71 | public function update(Request $request, Category $category) | 81 | public function update(Request $request, Category $category) |
72 | { | 82 | { |
73 | // | 83 | $params = $request->all(); |
84 | |||
85 | if ($request->has('image')) { | ||
86 | Storage::delete($category->image); | ||
87 | $params['image'] = $request->file('image')->store('category', 'public'); | ||
88 | } else { | ||
89 | if (!empty($category->image)) $params['image'] = $category->image; | ||
90 | } | ||
91 | |||
92 | $category->update($params); | ||
93 | return redirect()->route('admin.category.index'); | ||
74 | } | 94 | } |
75 | 95 | ||
76 | /** | 96 | /** |
77 | * Remove the specified resource from storage. | 97 | * Remove the specified resource from storage. |
78 | * | 98 | * |
79 | * @param \App\Models\Category $category | 99 | * @param \App\Models\Category $category |
80 | * @return \Illuminate\Http\Response | 100 | * @return \Illuminate\Http\Response |
81 | */ | 101 | */ |
82 | public function destroy(Category $category) | 102 | public function destroy(Category $category) |
83 | { | 103 | { |
84 | // | 104 | if (!empty($category->image)) { |
105 | Storage::delete($category->image); | ||
106 | } | ||
107 | $category->delete(); | ||
108 | return redirect()->route('admin.category.index'); | ||
85 | } | 109 | } |
86 | } | 110 | } |
87 | 111 |
app/Http/Controllers/Admin/NewsController.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\News; | 6 | use App\Models\News; |
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 NewsController extends Controller | 12 | class NewsController 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 | $news = News::query()->orderBy('id')->paginate(5); |
22 | return view('admin.news.index', compact('news')); | ||
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.news.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 | 'image' => 'required|min:3|max:10000', | ||
45 | 'title' => 'required|min:3|max:255', | ||
46 | ]; | ||
47 | $messages = [ | ||
48 | 'required' => 'Поле не может быть пустым!', | ||
49 | ]; | ||
50 | $validator = Validator::make($request->all(), $rules, $messages); | ||
51 | |||
52 | if ($validator->fails()) { | ||
53 | return redirect()->route('admin.news.create') | ||
54 | ->withErrors($validator); | ||
55 | } else { | ||
56 | |||
57 | $news = new News(); | ||
58 | $news->title = $request->title; | ||
59 | $news->text = $request->text; | ||
60 | $news->image = $request->file('image')->store('news', 'public'); | ||
61 | $news->save(); | ||
62 | |||
63 | //$area->fotos()->save($foto_area); | ||
64 | return redirect()->route('admin.news.index'); | ||
65 | } | ||
40 | } | 66 | } |
41 | 67 | ||
42 | /** | 68 | /** |
43 | * Display the specified resource. | 69 | * Display the specified resource. |
44 | * | 70 | * |
45 | * @param \App\Models\News $news | 71 | * @param \App\Models\News $news |
46 | * @return \Illuminate\Http\Response | 72 | * @return \Illuminate\Http\Response |
47 | */ | 73 | */ |
48 | public function show(News $news) | 74 | public function show(News $news) |
49 | { | 75 | { |
50 | // | 76 | // |
51 | } | 77 | } |
52 | 78 | ||
53 | /** | 79 | /** |
54 | * Show the form for editing the specified resource. | 80 | * Show the form for editing the specified resource. |
55 | * | 81 | * |
56 | * @param \App\Models\News $news | 82 | * @param \App\Models\News $news |
57 | * @return \Illuminate\Http\Response | 83 | * @return \Illuminate\Http\Response |
58 | */ | 84 | */ |
59 | public function edit(News $news) | 85 | public function edit(News $news) |
60 | { | 86 | { |
61 | // | 87 | return view('admin.news.edit', compact('news')); |
62 | } | 88 | } |
63 | 89 | ||
64 | /** | 90 | /** |
65 | * Update the specified resource in storage. | 91 | * Update the specified resource in storage. |
66 | * | 92 | * |
67 | * @param \Illuminate\Http\Request $request | 93 | * @param \Illuminate\Http\Request $request |
68 | * @param \App\Models\News $news | 94 | * @param \App\Models\News $news |
69 | * @return \Illuminate\Http\Response | 95 | * @return \Illuminate\Http\Response |
70 | */ | 96 | */ |
71 | public function update(Request $request, News $news) | 97 | public function update(Request $request, News $news) |
72 | { | 98 | { |
73 | // | 99 | $rules = [ |
100 | 'title' => 'required|min:3|max:255' | ||
101 | ]; | ||
102 | |||
103 | if (empty($news->image)) { | ||
104 | $rules['image'] = 'required|min:3|max:10000'; | ||
105 | } | ||
106 | $messages = [ | ||
107 | 'required' => 'Поле не может быть пустым!', | ||
108 | ]; | ||
109 | $validator = Validator::make($request->all(), $rules, $messages); | ||
110 | |||
111 | if ($validator->fails()) { | ||
112 | return redirect()->route('admin.news.edit', ['news' => $news->id]) | ||
113 | ->withErrors($validator); | ||
114 | } else { | ||
115 | $params = $request->all(); | ||
116 | unset($params['image']); | ||
117 | if ($request->has('image')) { | ||
118 | Storage::delete($news->image); | ||
119 | $params['image'] = $request->file('image')->store('news', 'public'); | ||
120 | } | ||
121 | |||
122 | $news->update($params); | ||
123 | return redirect()->route('admin.news.index'); | ||
124 | } | ||
74 | } | 125 | } |
75 | 126 | ||
76 | /** | 127 | /** |
77 | * Remove the specified resource from storage. | 128 | * Remove the specified resource from storage. |
78 | * | 129 | * |
79 | * @param \App\Models\News $news | 130 | * @param \App\Models\News $news |
80 | * @return \Illuminate\Http\Response | 131 | * @return \Illuminate\Http\Response |
81 | */ | 132 | */ |
82 | public function destroy(News $news) | 133 | public function destroy(News $news) |
83 | { | 134 | { |
84 | // | 135 | if (!empty($news->image)) { |
136 | Storage::delete($news->image); | ||
137 | } | ||
138 | $news->delete(); | ||
139 | return redirect()->route('admin.news.index'); | ||
85 | } | 140 | } |
86 | } | 141 | } |
87 | 142 |
app/Http/Controllers/Admin/ProjectController.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\Project; | 6 | use App\Models\Project; |
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 ProjectController extends Controller | 12 | class ProjectController 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 | $projects = Project::query()->orderBy('id')->paginate(5); |
22 | return view('admin.projects.index', compact('projects')); | ||
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.projects.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 | 'image' => 'required|min:3|max:10000', | ||
45 | 'title' => 'required|min:3|max:255', | ||
46 | 'customer' => 'required|min:3|max:255', | ||
47 | 'date_project' => 'required|min:3|max:255|date_format:d.m.Y', | ||
48 | ]; | ||
49 | $messages = [ | ||
50 | 'required' => 'Поле не может быть пустым!', | ||
51 | 'date' => 'Поле должно быть формата дата', | ||
52 | ]; | ||
53 | $validator = Validator::make($request->all(), $rules, $messages); | ||
54 | |||
55 | if ($validator->fails()) { | ||
56 | return redirect()->route('admin.project.create') | ||
57 | ->withErrors($validator); | ||
58 | } else { | ||
59 | |||
60 | $Project = new Project(); | ||
61 | $Project->title = $request->title; | ||
62 | $Project->customer = $request->customer; | ||
63 | $Project->date_project = date("Y-m-d", strtotime($request->date_project)); | ||
64 | $Project->image = $request->file('image')->store('project', 'public'); | ||
65 | $Project->save(); | ||
66 | |||
67 | //$area->fotos()->save($foto_area); | ||
68 | return redirect()->route('admin.project.index'); | ||
69 | } | ||
40 | } | 70 | } |
41 | 71 | ||
42 | /** | 72 | /** |
43 | * Display the specified resource. | 73 | * Display the specified resource. |
44 | * | 74 | * |
45 | * @param \App\Models\Project $project | 75 | * @param \App\Models\Project $project |
46 | * @return \Illuminate\Http\Response | 76 | * @return \Illuminate\Http\Response |
47 | */ | 77 | */ |
48 | public function show(Project $project) | 78 | public function show(Project $project) |
49 | { | 79 | { |
50 | // | 80 | // |
51 | } | 81 | } |
52 | 82 | ||
53 | /** | 83 | /** |
54 | * Show the form for editing the specified resource. | 84 | * Show the form for editing the specified resource. |
55 | * | 85 | * |
56 | * @param \App\Models\Project $project | 86 | * @param \App\Models\Project $project |
57 | * @return \Illuminate\Http\Response | 87 | * @return \Illuminate\Http\Response |
58 | */ | 88 | */ |
59 | public function edit(Project $project) | 89 | public function edit(Project $project) |
60 | { | 90 | { |
61 | // | 91 | return view('admin.projects.edit', compact('project')); |
62 | } | 92 | } |
63 | 93 | ||
64 | /** | 94 | /** |
65 | * Update the specified resource in storage. | 95 | * Update the specified resource in storage. |
66 | * | 96 | * |
67 | * @param \Illuminate\Http\Request $request | 97 | * @param \Illuminate\Http\Request $request |
68 | * @param \App\Models\Project $project | 98 | * @param \App\Models\Project $project |
69 | * @return \Illuminate\Http\Response | 99 | * @return \Illuminate\Http\Response |
70 | */ | 100 | */ |
71 | public function update(Request $request, Project $project) | 101 | public function update(Request $request, Project $project) |
72 | { | 102 | { |
73 | // | 103 | $rules = [ |
104 | 'title' => 'required|min:3|max:255', | ||
105 | 'customer' => 'required|min:3|max:255', | ||
106 | 'date_project' => 'required|min:3|max:255|date_format:d.m.Y', | ||
107 | ]; | ||
108 | |||
109 | if (empty($project->image)) { | ||
110 | $rules['image'] = 'required|min:3|max:10000'; | ||
111 | } | ||
112 | $messages = [ | ||
113 | 'required' => 'Поле не может быть пустым!', | ||
114 | ]; | ||
115 | |||
116 | $validator = Validator::make($request->all(), $rules, $messages); | ||
117 | |||
118 | if ($validator->fails()) { | ||
119 | return redirect()->route('admin.project.edit', ['project' => $project->id]) | ||
120 | ->withErrors($validator); | ||
121 | } else { | ||
122 | $params = $request->all(); | ||
123 | unset($params['image']); | ||
124 | if ($request->has('image')) { | ||
125 | Storage::delete($project->image); | ||
126 | $params['image'] = $request->file('image')->store('project', 'public'); | ||
127 | } | ||
128 | |||
129 | $project->update($params); | ||
130 | return redirect()->route('admin.project.index'); | ||
131 | } | ||
74 | } | 132 | } |
75 | 133 | ||
76 | /** | 134 | /** |
77 | * Remove the specified resource from storage. | 135 | * Remove the specified resource from storage. |
78 | * | 136 | * |
79 | * @param \App\Models\Project $project | 137 | * @param \App\Models\Project $project |
80 | * @return \Illuminate\Http\Response | 138 | * @return \Illuminate\Http\Response |
81 | */ | 139 | */ |
82 | public function destroy(Project $project) | 140 | public function destroy(Project $project) |
83 | { | 141 | { |
84 | // | 142 | if (!empty($project->image)) { |
143 | Storage::delete($project->image); | ||
144 | } | ||
145 | $project->delete(); | ||
146 | return redirect()->route('admin.project.index'); | ||
85 | } | 147 | } |
86 | } | 148 | } |
87 | 149 |
app/Http/Requests/CategoryRequest.php
File was created | 1 | <?php | |
2 | |||
3 | namespace App\Http\Requests; | ||
4 | |||
5 | use Illuminate\Foundation\Http\FormRequest; | ||
6 | |||
7 | class CategoryRequest 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 true; | ||
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 | 'name' => 'required|min:3|max:255', | ||
28 | //'description' => 'required|min:5', | ||
29 | 'image' => [ | ||
30 | 'mimes:jpeg,jpg,png', | ||
31 | 'max:10000' | ||
32 | ], | ||
33 | ]; | ||
34 | } | ||
35 | |||
36 | public function messages() { | ||
37 | return [ | ||
38 | 'required' => 'Поле :attribute обязательно для ввода', | ||
39 | 'min' => [ | ||
40 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | ||
41 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | ||
42 | ], | ||
43 | 'max' => [ | ||
44 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | ||
45 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | ||
46 | ], | ||
47 | |||
48 | ]; | ||
49 | } | ||
50 | |||
51 | } | ||
52 |
app/Models/Category.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 Category extends Model | 8 | class Category extends Model |
9 | { | 9 | { |
10 | use HasFactory; | 10 | use HasFactory; |
11 | |||
12 | protected $fillable = ['name', 'image', 'content', 'parent_id']; | ||
11 | } | 13 | } |
12 | 14 |
app/Providers/ComposerServiceProvider.php
File was created | 1 | <?php | |
2 | |||
3 | namespace App\Providers; | ||
4 | |||
5 | use App\Models\Category; | ||
6 | use Illuminate\Support\Facades\View; | ||
7 | use Illuminate\Support\ServiceProvider; | ||
8 | |||
9 | class ComposerServiceProvider extends ServiceProvider | ||
10 | { | ||
11 | /** | ||
12 | * Register services. | ||
13 | * | ||
14 | * @return void | ||
15 | */ | ||
16 | public function register() | ||
17 | { | ||
18 | $views = [ | ||
19 | 'layout.part.categories', //меню в правой колонке в публичной части | ||
20 | 'admin.part.categories', //выбор категории поста при редактировании | ||
21 | 'admin.part.parents', //выбор родителя категории при редактировании | ||
22 | 'admin.part.all-ctgs', //все категории в административной части | ||
23 | ]; | ||
24 | View::composer($views, | ||
25 | function($view) { | ||
26 | static $items = null; | ||
27 | if (is_null($items)) { | ||
28 | $items = Category::all(); | ||
29 | } | ||
30 | $view->with(['items' => $items]); | ||
31 | }); | ||
32 | } | ||
33 | |||
34 | /** | ||
35 | * Bootstrap services. | ||
36 | * | ||
37 | * @return void | ||
38 | */ | ||
39 | public function boot() | ||
40 | { | ||
41 | View::composer('layout.part.categories', | ||
42 | function($view) | ||
43 | { | ||
44 | static $items = null; | ||
45 | |||
46 | if (is_null($items)) { | ||
47 | $items = Category::all(); | ||
48 | $parent = 0; | ||
49 | $view->with(['items' => $items, 'parent' => $parent]); | ||
50 | } else { | ||
51 | $view->with(['items' => $items]); | ||
52 | } | ||
53 | |||
54 | } | ||
55 | ); | ||
56 | } | ||
57 | } | ||
58 |
config/app.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | use Illuminate\Support\Facades\Facade; | 3 | use Illuminate\Support\Facades\Facade; |
4 | 4 | ||
5 | return [ | 5 | return [ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | |-------------------------------------------------------------------------- | 8 | |-------------------------------------------------------------------------- |
9 | | Application Name | 9 | | Application Name |
10 | |-------------------------------------------------------------------------- | 10 | |-------------------------------------------------------------------------- |
11 | | | 11 | | |
12 | | This value is the name of your application. This value is used when the | 12 | | This value is the name of your application. This value is used when the |
13 | | framework needs to place the application's name in a notification or | 13 | | framework needs to place the application's name in a notification or |
14 | | any other location as required by the application or its packages. | 14 | | any other location as required by the application or its packages. |
15 | | | 15 | | |
16 | */ | 16 | */ |
17 | 17 | ||
18 | 'name' => env('APP_NAME', 'Laravel'), | 18 | 'name' => env('APP_NAME', 'Laravel'), |
19 | 19 | ||
20 | /* | 20 | /* |
21 | |-------------------------------------------------------------------------- | 21 | |-------------------------------------------------------------------------- |
22 | | Application Environment | 22 | | Application Environment |
23 | |-------------------------------------------------------------------------- | 23 | |-------------------------------------------------------------------------- |
24 | | | 24 | | |
25 | | This value determines the "environment" your application is currently | 25 | | This value determines the "environment" your application is currently |
26 | | running in. This may determine how you prefer to configure various | 26 | | running in. This may determine how you prefer to configure various |
27 | | services the application utilizes. Set this in your ".env" file. | 27 | | services the application utilizes. Set this in your ".env" file. |
28 | | | 28 | | |
29 | */ | 29 | */ |
30 | 30 | ||
31 | 'env' => env('APP_ENV', 'production'), | 31 | 'env' => env('APP_ENV', 'production'), |
32 | 32 | ||
33 | /* | 33 | /* |
34 | |-------------------------------------------------------------------------- | 34 | |-------------------------------------------------------------------------- |
35 | | Application Debug Mode | 35 | | Application Debug Mode |
36 | |-------------------------------------------------------------------------- | 36 | |-------------------------------------------------------------------------- |
37 | | | 37 | | |
38 | | When your application is in debug mode, detailed error messages with | 38 | | When your application is in debug mode, detailed error messages with |
39 | | stack traces will be shown on every error that occurs within your | 39 | | stack traces will be shown on every error that occurs within your |
40 | | application. If disabled, a simple generic error page is shown. | 40 | | application. If disabled, a simple generic error page is shown. |
41 | | | 41 | | |
42 | */ | 42 | */ |
43 | 43 | ||
44 | 'debug' => (bool) env('APP_DEBUG', false), | 44 | 'debug' => (bool) env('APP_DEBUG', false), |
45 | 45 | ||
46 | /* | 46 | /* |
47 | |-------------------------------------------------------------------------- | 47 | |-------------------------------------------------------------------------- |
48 | | Application URL | 48 | | Application URL |
49 | |-------------------------------------------------------------------------- | 49 | |-------------------------------------------------------------------------- |
50 | | | 50 | | |
51 | | This URL is used by the console to properly generate URLs when using | 51 | | This URL is used by the console to properly generate URLs when using |
52 | | the Artisan command line tool. You should set this to the root of | 52 | | the Artisan command line tool. You should set this to the root of |
53 | | your application so that it is used when running Artisan tasks. | 53 | | your application so that it is used when running Artisan tasks. |
54 | | | 54 | | |
55 | */ | 55 | */ |
56 | 56 | ||
57 | 'url' => env('APP_URL', 'http://localhost'), | 57 | 'url' => env('APP_URL', 'http://localhost'), |
58 | 58 | ||
59 | 'asset_url' => env('ASSET_URL'), | 59 | 'asset_url' => env('ASSET_URL'), |
60 | 60 | ||
61 | /* | 61 | /* |
62 | |-------------------------------------------------------------------------- | 62 | |-------------------------------------------------------------------------- |
63 | | Application Timezone | 63 | | Application Timezone |
64 | |-------------------------------------------------------------------------- | 64 | |-------------------------------------------------------------------------- |
65 | | | 65 | | |
66 | | Here you may specify the default timezone for your application, which | 66 | | Here you may specify the default timezone for your application, which |
67 | | will be used by the PHP date and date-time functions. We have gone | 67 | | will be used by the PHP date and date-time functions. We have gone |
68 | | ahead and set this to a sensible default for you out of the box. | 68 | | ahead and set this to a sensible default for you out of the box. |
69 | | | 69 | | |
70 | */ | 70 | */ |
71 | 71 | ||
72 | 'timezone' => 'UTC', | 72 | 'timezone' => 'UTC', |
73 | 73 | ||
74 | /* | 74 | /* |
75 | |-------------------------------------------------------------------------- | 75 | |-------------------------------------------------------------------------- |
76 | | Application Locale Configuration | 76 | | Application Locale Configuration |
77 | |-------------------------------------------------------------------------- | 77 | |-------------------------------------------------------------------------- |
78 | | | 78 | | |
79 | | The application locale determines the default locale that will be used | 79 | | The application locale determines the default locale that will be used |
80 | | by the translation service provider. You are free to set this value | 80 | | by the translation service provider. You are free to set this value |
81 | | to any of the locales which will be supported by the application. | 81 | | to any of the locales which will be supported by the application. |
82 | | | 82 | | |
83 | */ | 83 | */ |
84 | 84 | ||
85 | 'locale' => 'en', | 85 | 'locale' => 'en', |
86 | 86 | ||
87 | /* | 87 | /* |
88 | |-------------------------------------------------------------------------- | 88 | |-------------------------------------------------------------------------- |
89 | | Application Fallback Locale | 89 | | Application Fallback Locale |
90 | |-------------------------------------------------------------------------- | 90 | |-------------------------------------------------------------------------- |
91 | | | 91 | | |
92 | | The fallback locale determines the locale to use when the current one | 92 | | The fallback locale determines the locale to use when the current one |
93 | | is not available. You may change the value to correspond to any of | 93 | | is not available. You may change the value to correspond to any of |
94 | | the language folders that are provided through your application. | 94 | | the language folders that are provided through your application. |
95 | | | 95 | | |
96 | */ | 96 | */ |
97 | 97 | ||
98 | 'fallback_locale' => 'en', | 98 | 'fallback_locale' => 'en', |
99 | 99 | ||
100 | /* | 100 | /* |
101 | |-------------------------------------------------------------------------- | 101 | |-------------------------------------------------------------------------- |
102 | | Faker Locale | 102 | | Faker Locale |
103 | |-------------------------------------------------------------------------- | 103 | |-------------------------------------------------------------------------- |
104 | | | 104 | | |
105 | | This locale will be used by the Faker PHP library when generating fake | 105 | | This locale will be used by the Faker PHP library when generating fake |
106 | | data for your database seeds. For example, this will be used to get | 106 | | data for your database seeds. For example, this will be used to get |
107 | | localized telephone numbers, street address information and more. | 107 | | localized telephone numbers, street address information and more. |
108 | | | 108 | | |
109 | */ | 109 | */ |
110 | 110 | ||
111 | 'faker_locale' => 'en_US', | 111 | 'faker_locale' => 'en_US', |
112 | 112 | ||
113 | /* | 113 | /* |
114 | |-------------------------------------------------------------------------- | 114 | |-------------------------------------------------------------------------- |
115 | | Encryption Key | 115 | | Encryption Key |
116 | |-------------------------------------------------------------------------- | 116 | |-------------------------------------------------------------------------- |
117 | | | 117 | | |
118 | | This key is used by the Illuminate encrypter service and should be set | 118 | | This key is used by the Illuminate encrypter service and should be set |
119 | | to a random, 32 character string, otherwise these encrypted strings | 119 | | to a random, 32 character string, otherwise these encrypted strings |
120 | | will not be safe. Please do this before deploying an application! | 120 | | will not be safe. Please do this before deploying an application! |
121 | | | 121 | | |
122 | */ | 122 | */ |
123 | 123 | ||
124 | 'key' => env('APP_KEY'), | 124 | 'key' => env('APP_KEY'), |
125 | 125 | ||
126 | 'cipher' => 'AES-256-CBC', | 126 | 'cipher' => 'AES-256-CBC', |
127 | 127 | ||
128 | /* | 128 | /* |
129 | |-------------------------------------------------------------------------- | 129 | |-------------------------------------------------------------------------- |
130 | | Maintenance Mode Driver | 130 | | Maintenance Mode Driver |
131 | |-------------------------------------------------------------------------- | 131 | |-------------------------------------------------------------------------- |
132 | | | 132 | | |
133 | | These configuration options determine the driver used to determine and | 133 | | These configuration options determine the driver used to determine and |
134 | | manage Laravel's "maintenance mode" status. The "cache" driver will | 134 | | manage Laravel's "maintenance mode" status. The "cache" driver will |
135 | | allow maintenance mode to be controlled across multiple machines. | 135 | | allow maintenance mode to be controlled across multiple machines. |
136 | | | 136 | | |
137 | | Supported drivers: "file", "cache" | 137 | | Supported drivers: "file", "cache" |
138 | | | 138 | | |
139 | */ | 139 | */ |
140 | 140 | ||
141 | 'maintenance' => [ | 141 | 'maintenance' => [ |
142 | 'driver' => 'file', | 142 | 'driver' => 'file', |
143 | // 'store' => 'redis', | 143 | // 'store' => 'redis', |
144 | ], | 144 | ], |
145 | 145 | ||
146 | /* | 146 | /* |
147 | |-------------------------------------------------------------------------- | 147 | |-------------------------------------------------------------------------- |
148 | | Autoloaded Service Providers | 148 | | Autoloaded Service Providers |
149 | |-------------------------------------------------------------------------- | 149 | |-------------------------------------------------------------------------- |
150 | | | 150 | | |
151 | | The service providers listed here will be automatically loaded on the | 151 | | The service providers listed here will be automatically loaded on the |
152 | | request to your application. Feel free to add your own services to | 152 | | request to your application. Feel free to add your own services to |
153 | | this array to grant expanded functionality to your applications. | 153 | | this array to grant expanded functionality to your applications. |
154 | | | 154 | | |
155 | */ | 155 | */ |
156 | 156 | ||
157 | 'providers' => [ | 157 | 'providers' => [ |
158 | 158 | ||
159 | /* | 159 | /* |
160 | * Laravel Framework Service Providers... | 160 | * Laravel Framework Service Providers... |
161 | */ | 161 | */ |
162 | Illuminate\Auth\AuthServiceProvider::class, | 162 | Illuminate\Auth\AuthServiceProvider::class, |
163 | Illuminate\Broadcasting\BroadcastServiceProvider::class, | 163 | Illuminate\Broadcasting\BroadcastServiceProvider::class, |
164 | Illuminate\Bus\BusServiceProvider::class, | 164 | Illuminate\Bus\BusServiceProvider::class, |
165 | Illuminate\Cache\CacheServiceProvider::class, | 165 | Illuminate\Cache\CacheServiceProvider::class, |
166 | Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, | 166 | Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, |
167 | Illuminate\Cookie\CookieServiceProvider::class, | 167 | Illuminate\Cookie\CookieServiceProvider::class, |
168 | Illuminate\Database\DatabaseServiceProvider::class, | 168 | Illuminate\Database\DatabaseServiceProvider::class, |
169 | Illuminate\Encryption\EncryptionServiceProvider::class, | 169 | Illuminate\Encryption\EncryptionServiceProvider::class, |
170 | Illuminate\Filesystem\FilesystemServiceProvider::class, | 170 | Illuminate\Filesystem\FilesystemServiceProvider::class, |
171 | Illuminate\Foundation\Providers\FoundationServiceProvider::class, | 171 | Illuminate\Foundation\Providers\FoundationServiceProvider::class, |
172 | Illuminate\Hashing\HashServiceProvider::class, | 172 | Illuminate\Hashing\HashServiceProvider::class, |
173 | Illuminate\Mail\MailServiceProvider::class, | 173 | Illuminate\Mail\MailServiceProvider::class, |
174 | Illuminate\Notifications\NotificationServiceProvider::class, | 174 | Illuminate\Notifications\NotificationServiceProvider::class, |
175 | Illuminate\Pagination\PaginationServiceProvider::class, | 175 | Illuminate\Pagination\PaginationServiceProvider::class, |
176 | Illuminate\Pipeline\PipelineServiceProvider::class, | 176 | Illuminate\Pipeline\PipelineServiceProvider::class, |
177 | Illuminate\Queue\QueueServiceProvider::class, | 177 | Illuminate\Queue\QueueServiceProvider::class, |
178 | Illuminate\Redis\RedisServiceProvider::class, | 178 | Illuminate\Redis\RedisServiceProvider::class, |
179 | Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, | 179 | Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, |
180 | Illuminate\Session\SessionServiceProvider::class, | 180 | Illuminate\Session\SessionServiceProvider::class, |
181 | Illuminate\Translation\TranslationServiceProvider::class, | 181 | Illuminate\Translation\TranslationServiceProvider::class, |
182 | Illuminate\Validation\ValidationServiceProvider::class, | 182 | Illuminate\Validation\ValidationServiceProvider::class, |
183 | Illuminate\View\ViewServiceProvider::class, | 183 | Illuminate\View\ViewServiceProvider::class, |
184 | 184 | ||
185 | /* | 185 | /* |
186 | * Package Service Providers... | 186 | * Package Service Providers... |
187 | */ | 187 | */ |
188 | 188 | ||
189 | /* | 189 | /* |
190 | * Application Service Providers... | 190 | * Application Service Providers... |
191 | */ | 191 | */ |
192 | App\Providers\AppServiceProvider::class, | 192 | App\Providers\AppServiceProvider::class, |
193 | App\Providers\AuthServiceProvider::class, | 193 | App\Providers\AuthServiceProvider::class, |
194 | // App\Providers\BroadcastServiceProvider::class, | 194 | // App\Providers\BroadcastServiceProvider::class, |
195 | App\Providers\EventServiceProvider::class, | 195 | App\Providers\EventServiceProvider::class, |
196 | App\Providers\RouteServiceProvider::class, | 196 | App\Providers\RouteServiceProvider::class, |
197 | App\Providers\ComposerServiceProvider::class, | ||
197 | 198 | ||
198 | ], | 199 | ], |
199 | 200 | ||
200 | /* | 201 | /* |
201 | |-------------------------------------------------------------------------- | 202 | |-------------------------------------------------------------------------- |
202 | | Class Aliases | 203 | | Class Aliases |
203 | |-------------------------------------------------------------------------- | 204 | |-------------------------------------------------------------------------- |
204 | | | 205 | | |
205 | | This array of class aliases will be registered when this application | 206 | | This array of class aliases will be registered when this application |
206 | | is started. However, feel free to register as many as you wish as | 207 | | is started. However, feel free to register as many as you wish as |
207 | | the aliases are "lazy" loaded so they don't hinder performance. | 208 | | the aliases are "lazy" loaded so they don't hinder performance. |
208 | | | 209 | | |
209 | */ | 210 | */ |
210 | 211 | ||
211 | 'aliases' => Facade::defaultAliases()->merge([ | 212 | 'aliases' => Facade::defaultAliases()->merge([ |
212 | // 'ExampleClass' => App\Example\ExampleClass::class, | 213 | // 'ExampleClass' => App\Example\ExampleClass::class, |
213 | ])->toArray(), | 214 | ])->toArray(), |
214 | 215 | ||
215 | ]; | 216 | ]; |
216 | 217 |
resources/views/admin/banners/create.blade.php
1 | @extends('layout.admin', ['title' => 'Создание баннера']) | ||
2 | |||
3 | @section('content') | ||
4 | <div class="profile-block-wrapper"> | ||
5 | <div class="profile-block"> | ||
6 | <h2 class="modal-auth__title"> | ||
7 | Создание баннера | ||
8 | </h2> | ||
9 | <form method="post" enctype="multipart/form-data" class="modal-auth-form" action="{{ route('admin.banner.store') }}"> | ||
10 | @include('admin.banners.form') | ||
11 | </form> | ||
12 | |||
13 | </div> | ||
14 | </div> | ||
15 | @endsection | ||
16 |
resources/views/admin/banners/edit.blade.php
1 | @extends('layout.admin', ['title' => 'Редактирование баннера']) | ||
2 | |||
3 | @section('content') | ||
4 | <div class="profile-block-wrapper"> | ||
5 | <div class="profile-block"> | ||
6 | <h2 class="modal-auth__title"> | ||
7 | Редактирование баннера | ||
8 | </h2> | ||
9 | <form method="post" enctype="multipart/form-data" class="modal-auth-form" action="{{ route('admin.banner.update', ['banner' => $banner->id]) }}"> | ||
10 | @include('admin.banners.form') | ||
11 | </form> | ||
12 | </div> | ||
13 | </div> | ||
14 | @endsection | ||
15 |
resources/views/admin/banners/form.blade.php
1 | @csrf | ||
2 | |||
3 | @isset($banner) | ||
4 | @method('PUT') | ||
5 | @endisset | ||
6 | |||
7 | <label class="form__label" for="title">Заголовок баннера | ||
8 | <span class="auth-mail-error auth-mail-error--hidden">Ошибка</span> | ||
9 | </label><br> | ||
10 | @error('title') | ||
11 | <div class="alert alert-danger">{{ $message }}</div> | ||
12 | @enderror | ||
13 | <input class="form-input " type="text" id="title" name="title" placeholder="Введите заголовок" required value="{{ old('title') ?? $banner->title ?? '' }}"><br><br> | ||
14 | |||
15 | <label class="form__label" for="text">Описание баннера | ||
16 | <span class="auth-mail-error auth-mail-error--hidden">Ошибка</span> | ||
17 | </label><br> | ||
18 | @error('text') | ||
19 | <div class="alert alert-danger">{{ $message }}</div> | ||
20 | @enderror | ||
21 | <textarea class="form-input " id="text" name="text" placeholder="Введите текст" | ||
22 | required>{{ old('text') ?? $banner->text ?? '' }}</textarea><br><br> | ||
23 | |||
24 | |||
25 | <label class="form__label" for="image">Картинка | ||
26 | <span class="auth-mail-error auth-mail-error--hidden">Ошибка</span> | ||
27 | </label><br> | ||
28 | <input type="file" class="form-input form-control-file " name="image" id="image" accept="image/png, image/jpeg"> | ||
29 | @isset($banner->image) | ||
30 | <div class="form-group form-check"> | ||
31 | <img src="<?=asset(Storage::url($banner->image))?>" width="100px"/> | ||
32 | </div> | ||
33 | @endisset | ||
34 | |||
35 | <<div class="parts-content-form-bottom modal-auth-bottom"> | ||
36 | <button class="parts-content-form-bottom__button" type="submit">Сохранить</button> | ||
37 | </div> | ||
38 |
resources/views/admin/banners/index.blade.php
1 | @extends('layout.admin', ['title' => 'Профиль пользователя']) | 1 | @extends('layout.admin', ['title' => 'Баннеры']) |
2 | 2 | ||
3 | @section('content') | 3 | @section('content') |
4 | <!-- главный экран --> | 4 | <!-- главный экран --> |
5 | <div class="profile-block-wrapper"> | 5 | <div class="profile-block-wrapper"> |
6 | <div class="profile-block"> | 6 | <div class="profile-block"> |
7 | <h2 class="modal-auth__title_"> | ||
8 | Баннеры | ||
9 | </h2><br> | ||
7 | <a href="{{ route('admin.banner.create') }}" class="btn banner-container__button" style="margin: 0px;"> | 10 | <a href="{{ route('admin.banner.create') }}" class="btn banner-container__button" style="margin: 0px;"> |
8 | Создать баннер | 11 | Создать баннер |
9 | </a><br><br> | 12 | </a><br><br> |
10 | 13 | ||
11 | <table class="table" style="width: 100%"> | 14 | <table class="table" style="width: 100%"> |
12 | <thead> | 15 | <thead> |
13 | <tr> | 16 | <tr> |
14 | <th>ID</th> | 17 | <th>ID</th> |
15 | <th>Фото</th> | 18 | <th>Фото</th> |
16 | <th>Заголовок</th> | 19 | <th>Заголовок</th> |
17 | <th>Дата создания</th> | 20 | <th>Дата создания</th> |
18 | <th>Действия</th> | 21 | <th>Действия</th> |
19 | </tr> | 22 | </tr> |
20 | </thead> | 23 | </thead> |
21 | <tbody> | 24 | <tbody> |
22 | @if ($banners->count()) | 25 | @if ($banners->count()) |
23 | @foreach($banners as $banner) | 26 | @foreach($banners as $banner) |
24 | <tr> | 27 | <tr> |
25 | <td>{{ $banner->id }}</td> | 28 | <td>{{ $banner->id }}</td> |
26 | <td><? if (empty($banner->image)) {?>Нет фото<?} else {?> | 29 | <td><? if (empty($banner->image)) {?>Нет фото<?} else {?> |
27 | <!--<img src="/storage/app/public/<?//=$area->foto_main; //=asset(Storage::url($area->foto_main))?>" width="100px"/>--> | 30 | <!--<img src="/storage/app/public/<?//=$area->foto_main; //=asset(Storage::url($area->foto_main))?>" width="100px"/>--> |
28 | <img src="<?=asset(Storage::url($banner->image))?>" width="100px"/> | 31 | <img src="<?=asset(Storage::url($banner->image))?>" width="100px"/> |
29 | <?}?></td> | 32 | <?}?></td> |
30 | 33 | ||
31 | <td>{{ $banner->title }}</td> | 34 | <td>{{ $banner->title }}</td> |
32 | <td>{{ $banner->created_at }}</td> | 35 | <td>{{ $banner->created_at }}</td> |
33 | <td> <form action="{{ route('admin.banner.destroy', $banner) }}" method="POST"> | 36 | <td> <form action="{{ route('admin.banner.destroy', $banner) }}" method="POST"> |
34 | <a href="{{ route('admin.banner.edit', ['banner' => $banner->id]) }}"> | 37 | <a href="{{ route('admin.banner.edit', ['banner' => $banner->id]) }}"> |
35 | Редактировать | 38 | Редактировать |
36 | </a> | | 39 | </a> | |
37 | @csrf | 40 | @csrf |
38 | @method('DELETE') | 41 | @method('DELETE') |
39 | <input class=" btn-danger" type="submit" value="Удалить"> | 42 | <input class=" btn-danger" type="submit" value="Удалить"> |
40 | </form> | 43 | </form> |
41 | </td> | 44 | </td> |
42 | </tr> | 45 | </tr> |
43 | @endforeach | 46 | @endforeach |
44 | @else | 47 | @else |
45 | <tr> | 48 | <tr> |
46 | <td>-</td> | 49 | <td>-</td> |
47 | <td>-</td> | 50 | <td>-</td> |
48 | <td>-</td> | 51 | <td>-</td> |
49 | <td>-</td> | 52 | <td>-</td> |
50 | <td>-</td> | 53 | <td>-</td> |
51 | </tr> | 54 | </tr> |
52 | @endif | 55 | @endif |
53 | 56 | ||
54 | </tbody> | 57 | </tbody> |
55 | </table> | 58 | </table> |
56 | 59 | ||
57 | {{ $banners->onEachSide(1)->links('catalogs.paginate') }} | 60 | {{ $banners->onEachSide(1)->links('catalogs.paginate') }} |
58 | 61 | ||
59 | </div> | 62 | </div> |
60 | </div> | 63 | </div> |
61 | @endsection | 64 | @endsection |
62 | 65 |
resources/views/admin/category/create.blade.php
File was created | 1 | @extends('layout.admin', ['title' => 'Создание категории']) | |
2 | |||
3 | @section('content') | ||
4 | <div class="profile-block-wrapper"> | ||
5 | <div class="profile-block"> | ||
6 | <h2 class="modal-auth__title"> | ||
7 | Создание категории | ||
8 | </h2> | ||
9 | <form method="post" enctype="multipart/form-data" class="modal-auth-form" action="{{ route('admin.category.store') }}"> | ||
10 | @include('admin.category.form') | ||
11 | </form> | ||
12 | |||
13 | </div> | ||
14 | </div> | ||
15 | @endsection | ||
16 |
resources/views/admin/category/edit.blade.php
File was created | 1 | @extends('layout.admin', ['title' => 'Редактирование категории']) | |
2 | |||
3 | @section('content') | ||
4 | <div class="profile-block-wrapper"> | ||
5 | <div class="profile-block"> | ||
6 | <h2 class="modal-auth__title"> | ||
7 | Редактирование категории | ||
8 | </h2> | ||
9 | <form method="post" enctype="multipart/form-data" class="modal-auth-form" action="{{ route('admin.category.update', ['category' => $category->id]) }}"> | ||
10 | @include('admin.category.form') | ||
11 | </form> | ||
12 | </div> | ||
13 | </div> | ||
14 | @endsection | ||
15 |
resources/views/admin/category/form.blade.php
File was created | 1 | @csrf | |
2 | |||
3 | @isset($category) | ||
4 | @method('PUT') | ||
5 | @endisset | ||
6 | |||
7 | <label class="form__label" for="name">Заголовок категории | ||
8 | <span class="auth-mail-error auth-mail-error--hidden">Ошибка</span> | ||
9 | </label><br> | ||
10 | @error('name') | ||
11 | <div class="alert alert-danger">{{ $message }}</div> | ||
12 | @enderror | ||
13 | <input class="form-input " type="text" id="name" name="name" placeholder="Введите заголовок" required value="{{ old('name') ?? $category->name ?? '' }}"><br><br> | ||
14 | |||
15 | <label class="form__label" for="content">Описание категории | ||
16 | <span class="auth-mail-error auth-mail-error--hidden">Ошибка</span> | ||
17 | </label><br> | ||
18 | @error('content') | ||
19 | <div class="alert alert-danger">{{ $message }}</div> | ||
20 | @enderror | ||
21 | <textarea class="form-input " id="content" name="content" placeholder="Введите текст" | ||
22 | required>{{ old('text') ?? $category->content ?? '' }}</textarea><br><br> | ||
23 | |||
24 | |||
25 | <label class="form__label" for="image">Картинка | ||
26 | <span class="auth-mail-error auth-mail-error--hidden">Ошибка</span> | ||
27 | </label><br> | ||
28 | <input type="file" class="form-input form-control-file " name="image" id="image" accept="image/png, image/jpeg"> | ||
29 | @isset($category->image) | ||
30 | <div class="form-group form-check"> | ||
31 | <img src="<?=asset(Storage::url($category->image))?>" width="100px"/> | ||
32 | </div> | ||
33 | @endisset | ||
34 | |||
35 | <label class="form__label" for="image">Категория-родитель | ||
36 | <span class="auth-mail-error auth-mail-error--hidden">Ошибка</span> | ||
37 | </label><br> | ||
38 | |||
39 | <div class="form-group"> | ||
40 | @php | ||
41 | $parent_id = old('parent_id') ?? $category->parent_id ?? 0; | ||
42 | @endphp | ||
43 | <select name="parent_id" class="form-control" title="Родитель"> | ||
44 | <option value="0">Без родителя</option> | ||
45 | @include('admin.part.parents', ['level' => -1, 'parent' => 0]) | ||
46 | </select> | ||
47 | </div> | ||
48 | |||
49 | <<div class="parts-content-form-bottom modal-auth-bottom"> | ||
50 | <button class="parts-content-form-bottom__button" type="submit">Сохранить</button> | ||
51 | </div> | ||
52 |
resources/views/admin/category/index.blade.php
File was created | 1 | @extends('layout.admin', ['title' => 'Категории']) | |
2 | |||
3 | @section('content') | ||
4 | <div class="profile-block-wrapper"> | ||
5 | <div class="profile-block"> | ||
6 | <h2 class="modal-auth__title_"> | ||
7 | Категории | ||
8 | </h2><br> | ||
9 | <a href="{{ route('admin.category.create') }}" class="btn banner-container__button" style="margin: 0px;"> | ||
10 | Создать категорию | ||
11 | </a><br><br> | ||
12 | |||
13 | <table class="table" style="width: 100%"> | ||
14 | <thead> | ||
15 | <tr> | ||
16 | <th>ID</th> | ||
17 | <th>Фото</th> | ||
18 | <th>Заголовок</th> | ||
19 | <th>Дата создания</th> | ||
20 | <th>Действия</th> | ||
21 | </tr> | ||
22 | </thead> | ||
23 | <tbody> | ||
24 | @if ($categories->count()) | ||
25 | @foreach($categories as $category) | ||
26 | <tr> | ||
27 | <td>{{ $category->id }}</td> | ||
28 | <td><? if (empty($category->image)) {?>Нет фото<?} else {?> | ||
29 | <!--<img src="/storage/app/public/<?//=$area->foto_main; //=asset(Storage::url($area->foto_main))?>" width="100px"/>--> | ||
30 | <img src="<?=asset(Storage::url($category->image))?>" width="100px"/> | ||
31 | <?}?></td> | ||
32 | |||
33 | <td>{{ $category->name }}</td> | ||
34 | <td>{{ $category->created_at }}</td> | ||
35 | <td> <form action="{{ route('admin.category.destroy', $category) }}" method="POST"> | ||
36 | <a href="{{ route('admin.category.edit', ['category' => $category->id]) }}"> | ||
37 | Редактировать | ||
38 | </a> | | ||
39 | @csrf | ||
40 | @method('DELETE') | ||
41 | <input class=" btn-danger" type="submit" value="Удалить"> | ||
42 | </form> | ||
43 | </td> | ||
44 | </tr> | ||
45 | @endforeach | ||
46 | @else | ||
47 | <tr> | ||
48 | <td>-</td> | ||
49 | <td>-</td> | ||
50 | <td>-</td> | ||
51 | <td>-</td> | ||
52 | <td>-</td> | ||
53 | </tr> | ||
54 | @endif | ||
55 | |||
56 | </tbody> | ||
57 | </table> | ||
58 | |||
59 | {{ $categories->onEachSide(1)->links('catalogs.paginate') }} | ||
60 | |||
61 | </div> | ||
62 | </div> | ||
63 | <br><br> | ||
64 | @endsection | ||
65 |
resources/views/admin/news/create.blade.php
File was created | 1 | @extends('layout.admin', ['title' => 'Создание новости']) | |
2 | |||
3 | @section('content') | ||
4 | <div class="profile-block-wrapper"> | ||
5 | <div class="profile-block"> | ||
6 | <h2 class="modal-auth__title"> | ||
7 | Создание новости | ||
8 | </h2> | ||
9 | <form method="post" enctype="multipart/form-data" class="modal-auth-form" action="{{ route('admin.news.store') }}"> | ||
10 | @include('admin.news.form') | ||
11 | </form> | ||
12 | |||
13 | </div> | ||
14 | </div> | ||
15 | @endsection | ||
16 |
resources/views/admin/news/edit.blade.php
File was created | 1 | @extends('layout.admin', ['title' => 'Редактирование новости']) | |
2 | |||
3 | @section('content') | ||
4 | <div class="profile-block-wrapper"> | ||
5 | <div class="profile-block"> | ||
6 | <h2 class="modal-auth__title"> | ||
7 | Редактирование новости | ||
8 | </h2> | ||
9 | <form method="post" enctype="multipart/form-data" class="modal-auth-form" action="{{ route('admin.news.update', ['category' => $category->id]) }}"> | ||
10 | @include('admin.news.form') | ||
11 | </form> | ||
12 | </div> | ||
13 | </div> | ||
14 | @endsection | ||
15 |
resources/views/admin/news/form.blade.php
File was created | 1 | @csrf | |
2 | |||
3 | @isset($news) | ||
4 | @method('PUT') | ||
5 | @endisset | ||
6 | |||
7 | <label class="form__label" for="title">Заголовок новости | ||
8 | <span class="auth-mail-error auth-mail-error--hidden">Ошибка</span> | ||
9 | </label><br> | ||
10 | @error('title') | ||
11 | <div class="alert alert-danger">{{ $message }}</div> | ||
12 | @enderror | ||
13 | <input class="form-input " type="text" id="title" name="title" placeholder="Введите заголовок" required value="{{ old('title') ?? $news->title ?? '' }}"><br><br> | ||
14 | |||
15 | <label class="form__label" for="text">Описание новости | ||
16 | <span class="auth-mail-error auth-mail-error--hidden">Ошибка</span> | ||
17 | </label><br> | ||
18 | @error('text') | ||
19 | <div class="alert alert-danger">{{ $message }}</div> | ||
20 | @enderror | ||
21 | <textarea class="form-input " id="text" name="text" placeholder="Введите текст" | ||
22 | required>{{ old('text') ?? $news->text ?? '' }}</textarea><br><br> | ||
23 | |||
24 | |||
25 | <label class="form__label" for="image">Картинка | ||
26 | <span class="auth-mail-error auth-mail-error--hidden">Ошибка</span> | ||
27 | </label><br> | ||
28 | <input type="file" class="form-input form-control-file " name="image" id="image" accept="image/png, image/jpeg"> | ||
29 | @isset($news->image) | ||
30 | <div class="form-group form-check"> | ||
31 | <img src="<?=asset(Storage::url($news->image))?>" width="100px"/> | ||
32 | </div> | ||
33 | @endisset | ||
34 | |||
35 | <<div class="parts-content-form-bottom modal-auth-bottom"> | ||
36 | <button class="parts-content-form-bottom__button" type="submit">Сохранить</button> | ||
37 | </div> | ||
38 |
resources/views/admin/news/index.blade.php
File was created | 1 | @extends('layout.admin', ['title' => 'Новости']) | |
2 | |||
3 | @section('content') | ||
4 | <div class="profile-block-wrapper"> | ||
5 | <div class="profile-block"> | ||
6 | <h2 class="modal-auth__title_"> | ||
7 | Новости | ||
8 | </h2><br> | ||
9 | <a href="{{ route('admin.news.create') }}" class="btn banner-container__button" style="margin: 0px;"> | ||
10 | Создать категорию | ||
11 | </a><br><br> | ||
12 | |||
13 | <table class="table" style="width: 100%"> | ||
14 | <thead> | ||
15 | <tr> | ||
16 | <th>ID</th> | ||
17 | <th>Фото</th> | ||
18 | <th>Заголовок</th> | ||
19 | <th>Дата создания</th> | ||
20 | <th>Действия</th> | ||
21 | </tr> | ||
22 | </thead> | ||
23 | <tbody> | ||
24 | @if ($news->count()) | ||
25 | @foreach($news as $new) | ||
26 | <tr> | ||
27 | <td>{{ $new->id }}</td> | ||
28 | <td><? if (empty($new->image)) {?>Нет фото<?} else {?> | ||
29 | <!--<img src="/storage/app/public/<?//=$area->foto_main; //=asset(Storage::url($area->foto_main))?>" width="100px"/>--> | ||
30 | <img src="<?=asset(Storage::url($new->image))?>" width="100px"/> | ||
31 | <?}?></td> | ||
32 | |||
33 | <td>{{ $new->title }}</td> | ||
34 | <td>{{ $new->created_at }}</td> | ||
35 | <td> <form action="{{ route('admin.news.destroy', $new) }}" method="POST"> | ||
36 | <a href="{{ route('admin.news.edit', ['news' => $new->id]) }}"> | ||
37 | Редактировать | ||
38 | </a> | | ||
39 | @csrf | ||
40 | @method('DELETE') | ||
41 | <input class=" btn-danger" type="submit" value="Удалить"> | ||
42 | </form> | ||
43 | </td> | ||
44 | </tr> | ||
45 | @endforeach | ||
46 | @else | ||
47 | <tr> | ||
48 | <td>-</td> | ||
49 | <td>-</td> | ||
50 | <td>-</td> | ||
51 | <td>-</td> | ||
52 | <td>-</td> | ||
53 | </tr> | ||
54 | @endif | ||
55 | |||
56 | </tbody> | ||
57 | </table> | ||
58 | |||
59 | {{ $news->onEachSide(1)->links('catalogs.paginate') }} | ||
60 | |||
61 | </div> | ||
62 | </div> | ||
63 | <br><br> | ||
64 | @endsection | ||
65 |
resources/views/admin/part/parents.blade.php
File was created | 1 | @if ($items->where('parent_id', $parent)->count()) | |
2 | @php $level++ @endphp | ||
3 | @foreach ($items->where('parent_id', $parent) as $item) | ||
4 | <option value="{{ $item->id }}" @if ($item->id == $parent_id) selected @endif> | ||
5 | @if ($level) {!! str_repeat(' ', $level) !!} @endif | ||
6 | {{ $item->name }} | ||
7 | </option> | ||
8 | @include('admin.part.parents', ['level' => $level, 'parent' => $item->id]) | ||
9 | @endforeach | ||
10 | @endif | ||
11 |
resources/views/admin/projects/create.blade.php
File was created | 1 | @extends('layout.admin', ['title' => 'Создание проекта']) | |
2 | |||
3 | @section('content') | ||
4 | <div class="profile-block-wrapper"> | ||
5 | <div class="profile-block"> | ||
6 | <h2 class="modal-auth__title"> | ||
7 | Создание проекта | ||
8 | </h2> | ||
9 | <form method="post" enctype="multipart/form-data" class="modal-auth-form" action="{{ route('admin.project.store') }}"> | ||
10 | @include('admin.projects.form') | ||
11 | </form> | ||
12 | |||
13 | </div> | ||
14 | </div> | ||
15 | @endsection | ||
16 |
resources/views/admin/projects/edit.blade.php
File was created | 1 | @extends('layout.admin', ['title' => 'Редактирование проекта']) | |
2 | |||
3 | @section('content') | ||
4 | <div class="profile-block-wrapper"> | ||
5 | <div class="profile-block"> | ||
6 | <h2 class="modal-auth__title"> | ||
7 | Редактирование проекта | ||
8 | </h2> | ||
9 | <form method="post" enctype="multipart/form-data" class="modal-auth-form" action="{{ route('admin.project.update', ['project' => $project->id]) }}"> | ||
10 | @include('admin.projects.form') | ||
11 | </form> | ||
12 | </div> | ||
13 | </div> | ||
14 | @endsection | ||
15 |
resources/views/admin/projects/form.blade.php
File was created | 1 | <?php | |
2 | use Illuminate\Support\Facades\Storage; | ||
3 | ?> | ||
4 | @csrf | ||
5 | |||
6 | @isset($project) | ||
7 | @method('PUT') | ||
8 | @endisset | ||
9 | |||
10 | <label class="form__label" for="title">Заголовок | ||
11 | <span class="auth-mail-error auth-mail-error--hidden">Ошибка</span> | ||
12 | </label><br> | ||
13 | @error('title') | ||
14 | <div class="alert alert-danger">{{ $message }}</div> | ||
15 | @enderror | ||
16 | <input class="form-input " type="text" id="title" name="title" placeholder="Введите заголовок" required value="{{ old('title') ?? $project->title ?? '' }}"><br><br> | ||
17 | |||
18 | <label class="form__label" for="customer">Заказчик | ||
19 | <span class="auth-mail-error auth-mail-error--hidden">Ошибка</span> | ||
20 | </label><br> | ||
21 | @error('customer') | ||
22 | <div class="alert alert-danger">{{ $message }}</div> | ||
23 | @enderror | ||
24 | <input class="form-input " type="text" id="customer" name="customer" placeholder="Введите заказчика" required value="{{ old('customer') ?? $project->customer ?? '' }}"><br><br> | ||
25 | |||
26 | <label class="form__label" for="date_project">Дата сдачи проекта | ||
27 | <span class="auth-mail-error auth-mail-error--hidden">Ошибка</span> | ||
28 | </label><br> | ||
29 | @error('date_project') | ||
30 | <div class="alert alert-danger">{{ $message }}</div> | ||
31 | @enderror | ||
32 | <input class="form-input " type="text" id="date_project" name="date_project" placeholder="Введите дату" required value="{{ old('date_project') ?? $project->date_project ?? '' }}"><br><br> | ||
33 | |||
34 | <label class="form__label" for="image">Картинка | ||
35 | <span class="auth-mail-error auth-mail-error--hidden">Ошибка</span> | ||
36 | </label><br> | ||
37 | <input type="file" class="form-input form-control-file " name="image" id="image" accept="image/png, image/jpeg"> | ||
38 | @isset($project->image) | ||
39 | <div class="form-group form-check"> | ||
40 | <img src="<?=asset(Storage::url($project->image))?>" width="100px"/> | ||
41 | </div> | ||
42 | @endisset | ||
43 | |||
44 | <<div class="parts-content-form-bottom modal-auth-bottom"> | ||
45 | <button class="parts-content-form-bottom__button" type="submit">Сохранить</button> | ||
46 | </div> | ||
47 |
resources/views/admin/projects/index.blade.php
File was created | 1 | @extends('layout.admin', ['title' => 'Проекты']) | |
2 | |||
3 | @section('content') | ||
4 | <div class="profile-block-wrapper"> | ||
5 | <div class="profile-block"> | ||
6 | <h2 class="modal-auth__title_"> | ||
7 | Проекты | ||
8 | </h2><br> | ||
9 | <a href="{{ route('admin.project.create') }}" class="btn banner-container__button" style="margin: 0px;"> | ||
10 | Создать проект | ||
11 | </a><br><br> | ||
12 | |||
13 | <table class="table" style="width: 100%"> | ||
14 | <thead> | ||
15 | <tr> | ||
16 | <th>ID</th> | ||
17 | <th>Фото</th> | ||
18 | <th>Заголовок</th> | ||
19 | <th>Дата создания</th> | ||
20 | <th>Действия</th> | ||
21 | </tr> | ||
22 | </thead> | ||
23 | <tbody> | ||
24 | @if ($projects->count()) | ||
25 | @foreach($projects as $project) | ||
26 | <tr> | ||
27 | <td>{{ $project->id }}</td> | ||
28 | <td><? if (empty($project->image)) {?>Нет фото<?} else {?> | ||
29 | <!--<img src="/storage/app/public/<?//=$area->foto_main; //=asset(Storage::url($area->foto_main))?>" width="100px"/>--> | ||
30 | <img src="<?=asset(Storage::url($project->image))?>" width="100px"/> | ||
31 | <?}?></td> | ||
32 | |||
33 | <td>{{ $project->title }}</td> | ||
34 | <td>{{ $project->created_at }}</td> | ||
35 | <td> <form action="{{ route('admin.project.destroy', $project) }}" method="POST"> | ||
36 | <a href="{{ route('admin.project.edit', ['project' => $project->id]) }}"> | ||
37 | Редактировать | ||
38 | </a> | | ||
39 | @csrf | ||
40 | @method('DELETE') | ||
41 | <input class=" btn-danger" type="submit" value="Удалить"> | ||
42 | </form> | ||
43 | </td> | ||
44 | </tr> | ||
45 | @endforeach | ||
46 | @else | ||
47 | <tr> | ||
48 | <td>-</td> | ||
49 | <td>-</td> | ||
50 | <td>-</td> | ||
51 | <td>-</td> | ||
52 | <td>-</td> | ||
53 | </tr> | ||
54 | @endif | ||
55 | |||
56 | </tbody> | ||
57 | </table> | ||
58 | |||
59 | {{ $projects->onEachSide(1)->links('catalogs.paginate') }} | ||
60 | |||
61 | </div> | ||
62 | </div> | ||
63 | <br><br> | ||
64 | @endsection | ||
65 |
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 | 3 | ||
4 | <head> | 4 | <head> |
5 | <meta charset="UTF-8"> | 5 | <meta charset="UTF-8"> |
6 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> | 6 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
7 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> | 7 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
8 | <meta name="csrf-token" content="<?=csrf_token() ?>"> | 8 | <meta name="csrf-token" content="<?=csrf_token() ?>"> |
9 | <title>Vekprom</title> | 9 | <title>Vekprom</title> |
10 | <link rel="preload" href="{{ asset('fonts/Montserrat-Bold.woff2') }}" as="font" type="font/woff2" crossorigin> | 10 | <link rel="preload" href="{{ asset('fonts/Montserrat-Bold.woff2') }}" as="font" type="font/woff2" crossorigin> |
11 | <link rel="preload" href="{{ asset('fonts/Montserrat-Regular.woff2') }}" as="font" type="font/woff2" crossorigin> | 11 | <link rel="preload" href="{{ asset('fonts/Montserrat-Regular.woff2') }}" as="font" type="font/woff2" crossorigin> |
12 | <link rel="preload" href="{{ asset('fonts/Montserrat-Medium.woff2') }}" as="font" type="font/woff2" crossorigin> | 12 | <link rel="preload" href="{{ asset('fonts/Montserrat-Medium.woff2') }}" as="font" type="font/woff2" crossorigin> |
13 | <link rel="preload" href="{{ asset('fonts/Montserrat-SemiBold.woff2') }}" as="font" type="font/woff2" crossorigin> | 13 | <link rel="preload" href="{{ asset('fonts/Montserrat-SemiBold.woff2') }}" as="font" type="font/woff2" crossorigin> |
14 | <link rel="stylesheet" href="{{ asset('css/style.css') }}"> | 14 | <link rel="stylesheet" href="{{ asset('css/style.css') }}"> |
15 | <link rel="stylesheet" href="{{ asset('css/style_table.css') }}"> | 15 | <link rel="stylesheet" href="{{ asset('css/style_table.css') }}"> |
16 | <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.css" /> | 16 | <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.css" /> |
17 | </head> | 17 | </head> |
18 | 18 | ||
19 | <body> | 19 | <body> |
20 | 20 | ||
21 | <div class="wrapper"> | 21 | <div class="wrapper"> |
22 | 22 | ||
23 | <header class="header"> | 23 | <header class="header"> |
24 | <div class="header-up"> | 24 | <div class="header-up"> |
25 | <div class="header-up-wrapper"> | 25 | <div class="header-up-wrapper"> |
26 | <a class="header-mobile-call" href="tel:+79003003030"></a> | 26 | <a class="header-mobile-call" href="tel:+79003003030"></a> |
27 | <div class="header-up-left"> | 27 | <div class="header-up-left"> |
28 | <span class="header-up-left__your-city">Ваш город:</span> | 28 | <span class="header-up-left__your-city">Ваш город:</span> |
29 | <p class="header-up-left__city js_city_choose"> | 29 | <p class="header-up-left__city js_city_choose"> |
30 | Москва | 30 | Москва |
31 | </p> | 31 | </p> |
32 | <svg class="svg-location"> | 32 | <svg class="svg-location"> |
33 | <use xlink:href="{{ asset('/img/icons.svg#location') }}"></use> | 33 | <use xlink:href="{{ asset('/img/icons.svg#location') }}"></use> |
34 | </svg> | 34 | </svg> |
35 | <p class="header-up-left__address"> | 35 | <p class="header-up-left__address"> |
36 | пр-т Коммунистов, 62 | 36 | пр-т Коммунистов, 62 |
37 | </p> | 37 | </p> |
38 | </div> | 38 | </div> |
39 | <nav class="header-up__menu"> | 39 | <nav class="header-up__menu"> |
40 | <ul class="header-up__menu-wrapper"> | 40 | <ul class="header-up__menu-wrapper"> |
41 | <li class="header-up__menu-item js_test">О компании</li> | 41 | <li class="header-up__menu-item js_test">О компании</li> |
42 | <li class="header-up__menu-item">Демозал</li> | 42 | <li class="header-up__menu-item">Демозал</li> |
43 | <li class="header-up__menu-item">Сервис 24/7</li> | 43 | <li class="header-up__menu-item">Сервис 24/7</li> |
44 | </ul> | 44 | </ul> |
45 | </nav> | 45 | </nav> |
46 | <div class="header-up-right"> | 46 | <div class="header-up-right"> |
47 | <a href="#" class="header-up-right__item right-item-compare">Сравнить</a> | 47 | <a href="#" class="header-up-right__item right-item-compare">Сравнить</a> |
48 | <a href="#" class="header-up-right__item right-item-fav">Избранное</a> | 48 | <a href="#" class="header-up-right__item right-item-fav">Избранное</a> |
49 | <a href="#" class="header-up-right__item right-item-entry js_header_entry">Войти</a> | 49 | <a href="#" class="header-up-right__item right-item-entry js_header_entry">Войти</a> |
50 | </div> | 50 | </div> |
51 | </div> | 51 | </div> |
52 | </div> | 52 | </div> |
53 | <div class="header-main"> | 53 | <div class="header-main"> |
54 | <div class="container header-main-container"> | 54 | <div class="container header-main-container"> |
55 | <div class="header-main-left"> | 55 | <div class="header-main-left"> |
56 | <a class="header-main-left__logo" href="#"> | 56 | <a class="header-main-left__logo" href="#"> |
57 | <img src="{{ asset('img/logo.png') }}" alt="Векпром логотип"> | 57 | <img src="{{ asset('img/logo.png') }}" alt="Векпром логотип"> |
58 | </a> | 58 | </a> |
59 | <a class="header-main-left__button js-catalog-btn" href="#">Каталог</a> | 59 | <a class="header-main-left__button js-catalog-btn" href="#">Каталог</a> |
60 | <div class="header-main-left-search"> | 60 | <div class="header-main-left-search"> |
61 | <input class="header-main-left-search__input" type="search" placeholder="Станов вектор..." /> | 61 | <input class="header-main-left-search__input" type="search" placeholder="Станов вектор..." /> |
62 | <!-- <input class="header-main-left-search__mobile" type="search"> --> | 62 | <!-- <input class="header-main-left-search__mobile" type="search"> --> |
63 | </div> | 63 | </div> |
64 | </div> | 64 | </div> |
65 | <div class="header-main__right"> | 65 | <div class="header-main__right"> |
66 | <div class="header-main__right-socials"> | 66 | <div class="header-main__right-socials"> |
67 | <a class="mail" href="mailto:Info@vekprom.ru">Info@vekprom.ru</a> | 67 | <a class="mail" href="mailto:Info@vekprom.ru">Info@vekprom.ru</a> |
68 | <a class="tel" href="tel:88007006050">8 (800) 700-60-50</a> | 68 | <a class="tel" href="tel:88007006050">8 (800) 700-60-50</a> |
69 | </div> | 69 | </div> |
70 | <a class="header-main__right-button js_header_button_call">Заказать звонок</a> | 70 | <a class="header-main__right-button js_header_button_call">Заказать звонок</a> |
71 | <div class="header-main__right-cart"> | 71 | <div class="header-main__right-cart"> |
72 | <svg class="svg-cart"> | 72 | <svg class="svg-cart"> |
73 | <use xlink:href="{{ asset('/img/icons.svg#cart') }}"></use> | 73 | <use xlink:href="{{ asset('/img/icons.svg#cart') }}"></use> |
74 | </svg> | 74 | </svg> |
75 | <span class="number">2</span> | 75 | <span class="number">2</span> |
76 | </div> | 76 | </div> |
77 | </div> | 77 | </div> |
78 | </div> | 78 | </div> |
79 | </div> | 79 | </div> |
80 | 80 | ||
81 | <section class="modal modal-city modal-city--hidden js_modal_city"> | 81 | <section class="modal modal-city modal-city--hidden js_modal_city"> |
82 | <div class="modal-city-top"> | 82 | <div class="modal-city-top"> |
83 | <h2 class="modal-city-top__title"> | 83 | <h2 class="modal-city-top__title"> |
84 | Выбор города | 84 | Выбор города |
85 | </h2> | 85 | </h2> |
86 | <div class="header-main-left-search modal-city-search"> | 86 | <div class="header-main-left-search modal-city-search"> |
87 | <input class="header-main-left-search__input modal-city-search__input" type="search" placeholder="Введите ваш город" /> | 87 | <input class="header-main-left-search__input modal-city-search__input" type="search" placeholder="Введите ваш город" /> |
88 | </div> | 88 | </div> |
89 | <a class="modal-city-top__close js_modal_city_close" href="#"></a> | 89 | <a class="modal-city-top__close js_modal_city_close" href="#"></a> |
90 | </div> | 90 | </div> |
91 | <div class="modal-city-content"> | 91 | <div class="modal-city-content"> |
92 | <ul class="city-main"> | 92 | <ul class="city-main"> |
93 | <li class="city-main__item city-main__item--active js_city_item">Москва и Московская область</li> | 93 | <li class="city-main__item city-main__item--active js_city_item">Москва и Московская область</li> |
94 | <li class="city-main__item js_city_item">Санкт-Петербург и Ленинградская область</li> | 94 | <li class="city-main__item js_city_item">Санкт-Петербург и Ленинградская область</li> |
95 | <li class="city-main__item js_city_item">Свердловская обл.</li> | 95 | <li class="city-main__item js_city_item">Свердловская обл.</li> |
96 | <li class="city-main__item js_city_item">Краснодарский край.</li> | 96 | <li class="city-main__item js_city_item">Краснодарский край.</li> |
97 | <li class="city-main__item js_city_item">Башкортостан Респ.</li> | 97 | <li class="city-main__item js_city_item">Башкортостан Респ.</li> |
98 | <li class="city-main__item js_city_item">Самарская обл.</li> | 98 | <li class="city-main__item js_city_item">Самарская обл.</li> |
99 | <li class="city-main__item js_city_item">Челябинская обл.</li> | 99 | <li class="city-main__item js_city_item">Челябинская обл.</li> |
100 | <li class="city-main__item js_city_item">Татарстан Респ.</li> | 100 | <li class="city-main__item js_city_item">Татарстан Респ.</li> |
101 | <li class="city-main__item js_city_item">Новосибирская обл.</li> | 101 | <li class="city-main__item js_city_item">Новосибирская обл.</li> |
102 | <li class="city-main__item js_city_item">Нижегородская обл.</li> | 102 | <li class="city-main__item js_city_item">Нижегородская обл.</li> |
103 | </ul> | 103 | </ul> |
104 | <ul class="modal-city-block"> | 104 | <ul class="modal-city-block"> |
105 | <li class="modal-city-block__name js_city_item">Адыгея Респ.</li> | 105 | <li class="modal-city-block__name js_city_item">Адыгея Респ.</li> |
106 | <span class="modal-city-block__letter">A</span> | 106 | <span class="modal-city-block__letter">A</span> |
107 | <li class="modal-city-block__name js_city_item">Алтай Респ.</li> | 107 | <li class="modal-city-block__name js_city_item">Алтай Респ.</li> |
108 | <li class="modal-city-block__name js_city_item">Алтайский край.</li> | 108 | <li class="modal-city-block__name js_city_item">Алтайский край.</li> |
109 | <li class="modal-city-block__name js_city_item">Амурская обл.</li> | 109 | <li class="modal-city-block__name js_city_item">Амурская обл.</li> |
110 | <li class="modal-city-block__name js_city_item">Архангельская обл.</li> | 110 | <li class="modal-city-block__name js_city_item">Архангельская обл.</li> |
111 | <li class="modal-city-block__name js_city_item">Астраханская обл.</li> | 111 | <li class="modal-city-block__name js_city_item">Астраханская обл.</li> |
112 | </ul> | 112 | </ul> |
113 | <ul class="modal-city-block"> | 113 | <ul class="modal-city-block"> |
114 | <li class="modal-city-block__name js_city_item">Башкортостан Респ.</li> | 114 | <li class="modal-city-block__name js_city_item">Башкортостан Респ.</li> |
115 | <span class="modal-city-block__letter">Б</span> | 115 | <span class="modal-city-block__letter">Б</span> |
116 | <li class="modal-city-block__name js_city_item">Белгородская обл.</li> | 116 | <li class="modal-city-block__name js_city_item">Белгородская обл.</li> |
117 | <li class="modal-city-block__name js_city_item">Брянская обл.</li> | 117 | <li class="modal-city-block__name js_city_item">Брянская обл.</li> |
118 | <li class="modal-city-block__name js_city_item">Бурятия Респ.</li> | 118 | <li class="modal-city-block__name js_city_item">Бурятия Респ.</li> |
119 | </ul> | 119 | </ul> |
120 | <ul class="modal-city-block"> | 120 | <ul class="modal-city-block"> |
121 | <li class="modal-city-block__name js_city_item">Владимирская обл.</li> | 121 | <li class="modal-city-block__name js_city_item">Владимирская обл.</li> |
122 | <span class="modal-city-block__letter">В</span> | 122 | <span class="modal-city-block__letter">В</span> |
123 | <li class="modal-city-block__name js_city_item">Волгоградская обл.</li> | 123 | <li class="modal-city-block__name js_city_item">Волгоградская обл.</li> |
124 | <li class="modal-city-block__name js_city_item">Вологодская обл.</li> | 124 | <li class="modal-city-block__name js_city_item">Вологодская обл.</li> |
125 | <li class="modal-city-block__name js_city_item">Воронежская обл.</li> | 125 | <li class="modal-city-block__name js_city_item">Воронежская обл.</li> |
126 | </ul> | 126 | </ul> |
127 | <ul class="modal-city-block"> | 127 | <ul class="modal-city-block"> |
128 | <li class="modal-city-block__name js_city_item">Дагестан Респ.</li> | 128 | <li class="modal-city-block__name js_city_item">Дагестан Респ.</li> |
129 | <span class="modal-city-block__letter">Д</span> | 129 | <span class="modal-city-block__letter">Д</span> |
130 | </ul> | 130 | </ul> |
131 | <ul class="modal-city-block"> | 131 | <ul class="modal-city-block"> |
132 | <li class="modal-city-block__name js_city_item">Еврейская АО</li> | 132 | <li class="modal-city-block__name js_city_item">Еврейская АО</li> |
133 | <span class="modal-city-block__letter">Е</span> | 133 | <span class="modal-city-block__letter">Е</span> |
134 | </ul> | 134 | </ul> |
135 | <ul class="modal-city-block"> | 135 | <ul class="modal-city-block"> |
136 | <li class="modal-city-block__name js_city_item">Забайкальский край.</li> | 136 | <li class="modal-city-block__name js_city_item">Забайкальский край.</li> |
137 | <span class="modal-city-block__letter">З</span> | 137 | <span class="modal-city-block__letter">З</span> |
138 | </ul> | 138 | </ul> |
139 | <ul class="modal-city-block"> | 139 | <ul class="modal-city-block"> |
140 | <li class="modal-city-block__name js_city_item">Ивановская обл.</li> | 140 | <li class="modal-city-block__name js_city_item">Ивановская обл.</li> |
141 | <span class="modal-city-block__letter">И</span> | 141 | <span class="modal-city-block__letter">И</span> |
142 | <li class="modal-city-block__name js_city_item">Ингушетия Респ.</li> | 142 | <li class="modal-city-block__name js_city_item">Ингушетия Респ.</li> |
143 | <li class="modal-city-block__name js_city_item">Иркутская обл.</li> | 143 | <li class="modal-city-block__name js_city_item">Иркутская обл.</li> |
144 | </ul> | 144 | </ul> |
145 | <ul class="modal-city-block"> | 145 | <ul class="modal-city-block"> |
146 | <li class="modal-city-block__name js_city_item">Кабардино-Балкарская Респ.</li> | 146 | <li class="modal-city-block__name js_city_item">Кабардино-Балкарская Респ.</li> |
147 | <span class="modal-city-block__letter">К</span> | 147 | <span class="modal-city-block__letter">К</span> |
148 | <li class="modal-city-block__name js_city_item">Калининградская обл.</li> | 148 | <li class="modal-city-block__name js_city_item">Калининградская обл.</li> |
149 | <li class="modal-city-block__name js_city_item">Калужская обл.</li> | 149 | <li class="modal-city-block__name js_city_item">Калужская обл.</li> |
150 | <li class="modal-city-block__name js_city_item">Калужская обл.</li> | 150 | <li class="modal-city-block__name js_city_item">Калужская обл.</li> |
151 | <li class="modal-city-block__name js_city_item">Камчатский край.</li> | 151 | <li class="modal-city-block__name js_city_item">Камчатский край.</li> |
152 | <li class="modal-city-block__name js_city_item">Карачаево-Черкесская Респ.</li> | 152 | <li class="modal-city-block__name js_city_item">Карачаево-Черкесская Респ.</li> |
153 | <li class="modal-city-block__name js_city_item">Кемеровская обл.</li> | 153 | <li class="modal-city-block__name js_city_item">Кемеровская обл.</li> |
154 | <li class="modal-city-block__name js_city_item">Кировская обл.</li> | 154 | <li class="modal-city-block__name js_city_item">Кировская обл.</li> |
155 | <li class="modal-city-block__name js_city_item">Коми Респ.</li> | 155 | <li class="modal-city-block__name js_city_item">Коми Респ.</li> |
156 | <li class="modal-city-block__name js_city_item">Костромская обл.</li> | 156 | <li class="modal-city-block__name js_city_item">Костромская обл.</li> |
157 | <li class="modal-city-block__name js_city_item">Краснодарский край.</li> | 157 | <li class="modal-city-block__name js_city_item">Краснодарский край.</li> |
158 | <li class="modal-city-block__name js_city_item">Красноярский край.</li> | 158 | <li class="modal-city-block__name js_city_item">Красноярский край.</li> |
159 | <li class="modal-city-block__name js_city_item">Курская обл.</li> | 159 | <li class="modal-city-block__name js_city_item">Курская обл.</li> |
160 | </ul> | 160 | </ul> |
161 | <ul class="modal-city-block"> | 161 | <ul class="modal-city-block"> |
162 | <li class="modal-city-block__name js_city_item">Липецкая обл.</li> | 162 | <li class="modal-city-block__name js_city_item">Липецкая обл.</li> |
163 | <span class="modal-city-block__letter">Л</span> | 163 | <span class="modal-city-block__letter">Л</span> |
164 | </ul> | 164 | </ul> |
165 | <ul class="modal-city-block"> | 165 | <ul class="modal-city-block"> |
166 | <li class="modal-city-block__name js_city_item">Магаданская обл.</li> | 166 | <li class="modal-city-block__name js_city_item">Магаданская обл.</li> |
167 | <span class="modal-city-block__letter">М</span> | 167 | <span class="modal-city-block__letter">М</span> |
168 | <li class="modal-city-block__name js_city_item">Марий Эл Респ.</li> | 168 | <li class="modal-city-block__name js_city_item">Марий Эл Респ.</li> |
169 | <li class="modal-city-block__name js_city_item">Мордовия Респ.</li> | 169 | <li class="modal-city-block__name js_city_item">Мордовия Респ.</li> |
170 | </ul> | 170 | </ul> |
171 | <ul class="modal-city-block"> | 171 | <ul class="modal-city-block"> |
172 | <li class="modal-city-block__name js_city_item">Нижегородская обл.</li> | 172 | <li class="modal-city-block__name js_city_item">Нижегородская обл.</li> |
173 | <span class="modal-city-block__letter">Н</span> | 173 | <span class="modal-city-block__letter">Н</span> |
174 | <li class="modal-city-block__name js_city_item">Новгородская обл.</li> | 174 | <li class="modal-city-block__name js_city_item">Новгородская обл.</li> |
175 | <li class="modal-city-block__name js_city_item">Новосибирская обл.</li> | 175 | <li class="modal-city-block__name js_city_item">Новосибирская обл.</li> |
176 | </ul> | 176 | </ul> |
177 | <ul class="modal-city-block"> | 177 | <ul class="modal-city-block"> |
178 | <li class="modal-city-block__name js_city_item">Омская обл.</li> | 178 | <li class="modal-city-block__name js_city_item">Омская обл.</li> |
179 | <span class="modal-city-block__letter">О</span> | 179 | <span class="modal-city-block__letter">О</span> |
180 | <li class="modal-city-block__name js_city_item">Оренбургская обл.</li> | 180 | <li class="modal-city-block__name js_city_item">Оренбургская обл.</li> |
181 | <li class="modal-city-block__name js_city_item">Орловская обл.</li> | 181 | <li class="modal-city-block__name js_city_item">Орловская обл.</li> |
182 | </ul> | 182 | </ul> |
183 | <ul class="modal-city-block"> | 183 | <ul class="modal-city-block"> |
184 | <li class="modal-city-block__name js_city_item">Ростовская обл.</li> | 184 | <li class="modal-city-block__name js_city_item">Ростовская обл.</li> |
185 | <span class="modal-city-block__letter">Р</span> | 185 | <span class="modal-city-block__letter">Р</span> |
186 | <li class="modal-city-block__name js_city_item">Рязанская обл.</li> | 186 | <li class="modal-city-block__name js_city_item">Рязанская обл.</li> |
187 | </ul> | 187 | </ul> |
188 | <ul class="modal-city-block"> | 188 | <ul class="modal-city-block"> |
189 | <li class="modal-city-block__name js_city_item">Самарская</li> | 189 | <li class="modal-city-block__name js_city_item">Самарская</li> |
190 | <span class="modal-city-block__letter">С</span> | 190 | <span class="modal-city-block__letter">С</span> |
191 | <li class="modal-city-block__name js_city_item">Санкт-Петербург и Ленинградская область</li> | 191 | <li class="modal-city-block__name js_city_item">Санкт-Петербург и Ленинградская область</li> |
192 | <li class="modal-city-block__name js_city_item">Саратовская обл.</li> | 192 | <li class="modal-city-block__name js_city_item">Саратовская обл.</li> |
193 | <li class="modal-city-block__name js_city_item">Саха Республика - Якутия</li> | 193 | <li class="modal-city-block__name js_city_item">Саха Республика - Якутия</li> |
194 | <li class="modal-city-block__name js_city_item">Сахалинская обл.</li> | 194 | <li class="modal-city-block__name js_city_item">Сахалинская обл.</li> |
195 | <li class="modal-city-block__name js_city_item">Свердловская обл.</li> | 195 | <li class="modal-city-block__name js_city_item">Свердловская обл.</li> |
196 | <li class="modal-city-block__name js_city_item">Северная Осетия - Алания Респ.</li> | 196 | <li class="modal-city-block__name js_city_item">Северная Осетия - Алания Респ.</li> |
197 | <li class="modal-city-block__name js_city_item">Смоленская обл.</li> | 197 | <li class="modal-city-block__name js_city_item">Смоленская обл.</li> |
198 | </ul> | 198 | </ul> |
199 | <ul class="modal-city-block"> | 199 | <ul class="modal-city-block"> |
200 | <li class="modal-city-block__name js_city_item">Удмуртская</li> | 200 | <li class="modal-city-block__name js_city_item">Удмуртская</li> |
201 | <span class="modal-city-block__letter">У</span> | 201 | <span class="modal-city-block__letter">У</span> |
202 | <li class="modal-city-block__name js_city_item">Ульяновская</li> | 202 | <li class="modal-city-block__name js_city_item">Ульяновская</li> |
203 | </ul> | 203 | </ul> |
204 | <ul class="modal-city-block"> | 204 | <ul class="modal-city-block"> |
205 | <li class="modal-city-block__name js_city_item">Хабаровский</li> | 205 | <li class="modal-city-block__name js_city_item">Хабаровский</li> |
206 | <span class="modal-city-block__letter">Х</span> | 206 | <span class="modal-city-block__letter">Х</span> |
207 | <li class="modal-city-block__name js_city_item">Хакасия Респ.</li> | 207 | <li class="modal-city-block__name js_city_item">Хакасия Респ.</li> |
208 | <li class="modal-city-block__name js_city_item">Ханты-Мансийский Автономный округ - Югра АО.</li> | 208 | <li class="modal-city-block__name js_city_item">Ханты-Мансийский Автономный округ - Югра АО.</li> |
209 | </ul> | 209 | </ul> |
210 | <ul class="modal-city-block"> | 210 | <ul class="modal-city-block"> |
211 | <li class="modal-city-block__name js_city_item">Челябинская</li> | 211 | <li class="modal-city-block__name js_city_item">Челябинская</li> |
212 | <span class="modal-city-block__letter">Ч</span> | 212 | <span class="modal-city-block__letter">Ч</span> |
213 | <li class="modal-city-block__name js_city_item">Чеченская Респ.</li> | 213 | <li class="modal-city-block__name js_city_item">Чеченская Респ.</li> |
214 | <li class="modal-city-block__name js_city_item">Чувашская Республика - Чувашия.</li> | 214 | <li class="modal-city-block__name js_city_item">Чувашская Республика - Чувашия.</li> |
215 | </ul> | 215 | </ul> |
216 | <ul class="modal-city-block"> | 216 | <ul class="modal-city-block"> |
217 | <li class="modal-city-block__name js_city_item">Ямало-Ненецкий АО.</li> | 217 | <li class="modal-city-block__name js_city_item">Ямало-Ненецкий АО.</li> |
218 | <span class="modal-city-block__letter">Я</span> | 218 | <span class="modal-city-block__letter">Я</span> |
219 | <li class="modal-city-block__name js_city_item">Ярославская обл.</li> | 219 | <li class="modal-city-block__name js_city_item">Ярославская обл.</li> |
220 | </ul> | 220 | </ul> |
221 | 221 | ||
222 | </div> | 222 | </div> |
223 | <a class="modal-city__close js_modal_city_close" href="#"></a> | 223 | <a class="modal-city__close js_modal_city_close" href="#"></a> |
224 | </section> | 224 | </section> |
225 | <div class="modal-overlay modal-city-overlay modal-city-overlay--hidden js_modal_city_overlay"></div> | 225 | <div class="modal-overlay modal-city-overlay modal-city-overlay--hidden js_modal_city_overlay"></div> |
226 | 226 | ||
227 | 227 | ||
228 | <section class="modal modal-reg modal-reg--hidden js_modal_reg"> | 228 | <section class="modal modal-reg modal-reg--hidden js_modal_reg"> |
229 | <a class="modal__close modal-reg__close js_modal_reg_close" href="#"></a> | 229 | <a class="modal__close modal-reg__close js_modal_reg_close" href="#"></a> |
230 | <h2 class="modal-reg__title">Регистрация</h2> | 230 | <h2 class="modal-reg__title">Регистрация</h2> |
231 | <form class="modal-reg-form" method="post"> | 231 | <form class="modal-reg-form" method="post"> |
232 | <label class="form__label label-reg" for="name-reg">Ваше имя | 232 | <label class="form__label label-reg" for="name-reg">Ваше имя |
233 | <span class="required">*</span> | 233 | <span class="required">*</span> |
234 | </label> | 234 | </label> |
235 | <input class="form-input form__name" type="text" id="name-reg" name="name" placeholder="Введите ваше имя" required> | 235 | <input class="form-input form__name" type="text" id="name-reg" name="name" placeholder="Введите ваше имя" required> |
236 | 236 | ||
237 | <label class="form__label label-reg-pass reg-mail error" for="email-reg">E-mail | 237 | <label class="form__label label-reg-pass reg-mail error" for="email-reg">E-mail |
238 | <span class="required">*</span> | 238 | <span class="required">*</span> |
239 | <span class="reg-mail-error reg-mail-error--hidden">Ошибка</span> | 239 | <span class="reg-mail-error reg-mail-error--hidden">Ошибка</span> |
240 | </label> | 240 | </label> |
241 | <input class="form-input form__email reg-mail-input js_reg_mail_input" type="email" id="email-reg" name="email" | 241 | <input class="form-input form__email reg-mail-input js_reg_mail_input" type="email" id="email-reg" name="email" |
242 | placeholder="Введите ваш e-mail" required> | 242 | placeholder="Введите ваш e-mail" required> |
243 | 243 | ||
244 | <label class="form__label label-reg-pass error" for="password-reg">Пароль | 244 | <label class="form__label label-reg-pass error" for="password-reg">Пароль |
245 | <span class="required">*</span> | 245 | <span class="required">*</span> |
246 | </label> | 246 | </label> |
247 | <input class="form-input auth-pass-err js_reg_pass" type="password"" id="password-reg" name="password" | 247 | <input class="form-input auth-pass-err js_reg_pass" type="password"" id="password-reg" name="password" |
248 | placeholder="Введите ваш пароль" required> | 248 | placeholder="Введите ваш пароль" required> |
249 | <button class="modal-auth-show-pass reg-show-pass js_reg_show_pass"></button> | 249 | <button class="modal-auth-show-pass reg-show-pass js_reg_show_pass"></button> |
250 | 250 | ||
251 | <label class="form__label label-reg auth-label-pass" for="confirm-password-reg">Повторите пароль | 251 | <label class="form__label label-reg auth-label-pass" for="confirm-password-reg">Повторите пароль |
252 | <span class="required">*</span> | 252 | <span class="required">*</span> |
253 | <span class="reg-pass-error reg-pass-error--hidden">Ошибка</span> | 253 | <span class="reg-pass-error reg-pass-error--hidden">Ошибка</span> |
254 | </label> | 254 | </label> |
255 | <input class="form-input reg-pass-conf-input js_pass_conf" type="password"" id="confirm-password-reg" name="confirm-password" | 255 | <input class="form-input reg-pass-conf-input js_pass_conf" type="password"" id="confirm-password-reg" name="confirm-password" |
256 | placeholder="Введите пароль еще раз" required> | 256 | placeholder="Введите пароль еще раз" required> |
257 | <button class="modal-auth-show-pass reg-show-pass-second js_reg_show_pass_conf"></button> | 257 | <button class="modal-auth-show-pass reg-show-pass-second js_reg_show_pass_conf"></button> |
258 | 258 | ||
259 | <div class="parts-content-form-bottom modal-auth-bottom"> | 259 | <div class="parts-content-form-bottom modal-auth-bottom"> |
260 | <a class="modal-auth-bottom__reset js_restore_pass" href="#">Забыли пароль?</a> | 260 | <a class="modal-auth-bottom__reset js_restore_pass" href="#">Забыли пароль?</a> |
261 | <p class="parts-content-form-bottom__par modal-auth-bottom__note">Даю согласие на обработку персональных данных. | 261 | <p class="parts-content-form-bottom__par modal-auth-bottom__note">Даю согласие на обработку персональных данных. |
262 | </p> | 262 | </p> |
263 | <button class="parts-content-form-bottom__button" type="submit">Отправить заявку</button> | 263 | <button class="parts-content-form-bottom__button" type="submit">Отправить заявку</button> |
264 | </div> | 264 | </div> |
265 | </form> | 265 | </form> |
266 | <a class="modal-restore__back js_back_inner" href="#">Вернуться на главный экран</a> | 266 | <a class="modal-restore__back js_back_inner" href="#">Вернуться на главный экран</a> |
267 | </section> | 267 | </section> |
268 | <div class="modal-overlay modal-reg-overlay modal-reg-overlay--hidden js_modal_reg_overlay"></div> | 268 | <div class="modal-overlay modal-reg-overlay modal-reg-overlay--hidden js_modal_reg_overlay"></div> |
269 | 269 | ||
270 | <section class="modal modal-auth modal-auth--hidden js_modal_auth"> | 270 | <section class="modal modal-auth modal-auth--hidden js_modal_auth"> |
271 | <a class="modal__close modal-auth__close js_modal_auth_close" href="#"></a> | 271 | <a class="modal__close modal-auth__close js_modal_auth_close" href="#"></a> |
272 | <h2 class="modal-auth__title"> | 272 | <h2 class="modal-auth__title"> |
273 | Авторизация | 273 | Авторизация |
274 | </h2> | 274 | </h2> |
275 | <form method="post" class="modal-auth-form"> | 275 | <form method="post" class="modal-auth-form"> |
276 | <label class="form__label auth-label-mail" for="email-auth">E-mail | 276 | <label class="form__label auth-label-mail" for="email-auth">E-mail |
277 | <span class="auth-mail-error auth-mail-error--hidden">Ошибка</span> | 277 | <span class="auth-mail-error auth-mail-error--hidden">Ошибка</span> |
278 | </label> | 278 | </label> |
279 | <input class="form-input form__email auth-mail-err" type="email" id="email-auth" name="email" placeholder="Введите ваш e-mail" required> | 279 | <input class="form-input form__email auth-mail-err" type="email" id="email-auth" name="email" placeholder="Введите ваш e-mail" required> |
280 | 280 | ||
281 | <label class="form__label auth-label-pass" for="password-auth">Пароль | 281 | <label class="form__label auth-label-pass" for="password-auth">Пароль |
282 | <span class="auth-pass-error auth-pass-error--hidden">Ошибка</span> | 282 | <span class="auth-pass-error auth-pass-error--hidden">Ошибка</span> |
283 | </label> | 283 | </label> |
284 | <input class="form-input auth-pass-err js_auth_pass" type="password"" id="password-auth" name="password" placeholder="Введите ваш пароль" required> | 284 | <input class="form-input auth-pass-err js_auth_pass" type="password"" id="password-auth" name="password" placeholder="Введите ваш пароль" required> |
285 | <button class="modal-auth-show-pass js_auth_show_pass"></button> | 285 | <button class="modal-auth-show-pass js_auth_show_pass"></button> |
286 | <div class="parts-content-form-bottom modal-auth-bottom"> | 286 | <div class="parts-content-form-bottom modal-auth-bottom"> |
287 | <a class="modal-auth-bottom__reset js_restore_pass" href="#">Забыли пароль?</a> | 287 | <a class="modal-auth-bottom__reset js_restore_pass" href="#">Забыли пароль?</a> |
288 | <p class="parts-content-form-bottom__par modal-auth-bottom__note">Даю согласие на обработку персональных данных.</p> | 288 | <p class="parts-content-form-bottom__par modal-auth-bottom__note">Даю согласие на обработку персональных данных.</p> |
289 | <button class="parts-content-form-bottom__button" type="submit">Войти</button> | 289 | <button class="parts-content-form-bottom__button" type="submit">Войти</button> |
290 | </div> | 290 | </div> |
291 | </form> | 291 | </form> |
292 | </section> | 292 | </section> |
293 | <div class="modal-overlay modal-auth-overlay modal-auth-overlay--hidden js_modal_auth_overlay"></div> | 293 | <div class="modal-overlay modal-auth-overlay modal-auth-overlay--hidden js_modal_auth_overlay"></div> |
294 | 294 | ||
295 | <section class="modal modal-restore modal-restore--hidden js_modal_restore"> | 295 | <section class="modal modal-restore modal-restore--hidden js_modal_restore"> |
296 | <a class="modal__close modal-restore__close js_modal_restore_close" href="#"></a> | 296 | <a class="modal__close modal-restore__close js_modal_restore_close" href="#"></a> |
297 | <h2 class="modal-restore__title"> | 297 | <h2 class="modal-restore__title"> |
298 | Восстановить пароль | 298 | Восстановить пароль |
299 | </h2> | 299 | </h2> |
300 | <form method="post" class="modal-restore-form"> | 300 | <form method="post" class="modal-restore-form"> |
301 | <label class="form__label restore-label" for="email-restore">E-mail | 301 | <label class="form__label restore-label" for="email-restore">E-mail |
302 | <span class="required">*</span> | 302 | <span class="required">*</span> |
303 | </label> | 303 | </label> |
304 | <input class="form-input form__email" type="email" id="email-restore" name="email" | 304 | <input class="form-input form__email" type="email" id="email-restore" name="email" |
305 | placeholder="Введите ваш e-mail" required> | 305 | placeholder="Введите ваш e-mail" required> |
306 | <div class="parts-content-form-bottom modal-auth-bottom"> | 306 | <div class="parts-content-form-bottom modal-auth-bottom"> |
307 | <p class="parts-content-form-bottom__par modal-auth-bottom__note">Даю согласие на обработку персональных данных.</p> | 307 | <p class="parts-content-form-bottom__par modal-auth-bottom__note">Даю согласие на обработку персональных данных.</p> |
308 | <button class="parts-content-form-bottom__button" type="submit">Восстановить пароль</button> | 308 | <button class="parts-content-form-bottom__button" type="submit">Восстановить пароль</button> |
309 | </div> | 309 | </div> |
310 | </form> | 310 | </form> |
311 | <a class="modal-restore__back js_restore_back" href="#">Вернуться на главный экран</a> | 311 | <a class="modal-restore__back js_restore_back" href="#">Вернуться на главный экран</a> |
312 | </section> | 312 | </section> |
313 | <div class="modal-overlay modal-restore-overlay modal-restore-overlay--hidden js_modal_restore_overlay"></div> | 313 | <div class="modal-overlay modal-restore-overlay modal-restore-overlay--hidden js_modal_restore_overlay"></div> |
314 | 314 | ||
315 | <section class="modal modal-restore-succ modal-restore-succ--hidden js_modal_restore_succ"> | 315 | <section class="modal modal-restore-succ modal-restore-succ--hidden js_modal_restore_succ"> |
316 | <a class="modal__close modal-restore-succ__close js_modal_restore_succ_close" href="#"></a> | 316 | <a class="modal__close modal-restore-succ__close js_modal_restore_succ_close" href="#"></a> |
317 | <h2 class="modal-restore-succ__title"> | 317 | <h2 class="modal-restore-succ__title"> |
318 | Сообщение отправлено | 318 | Сообщение отправлено |
319 | </h2> | 319 | </h2> |
320 | <p class="modal-restore-succ__note">Мы отправили ссылку для восстановения доступа к вашему аккаунту на адрес</p> | 320 | <p class="modal-restore-succ__note">Мы отправили ссылку для восстановения доступа к вашему аккаунту на адрес</p> |
321 | <p class="modal-restore-succ__mail">v****m@g***l.com</p> | 321 | <p class="modal-restore-succ__mail">v****m@g***l.com</p> |
322 | <a class="modal-restore-succ__btn js_res_succ_ok" href="#">ОК</a> | 322 | <a class="modal-restore-succ__btn js_res_succ_ok" href="#">ОК</a> |
323 | <a class="modal-restore-succ__back js_res_succ_back" href="#">Вернуться на главный экран</a> | 323 | <a class="modal-restore-succ__back js_res_succ_back" href="#">Вернуться на главный экран</a> |
324 | </section> | 324 | </section> |
325 | <div class="modal-overlay modal-restore-succ-overlay modal-restore-succ-overlay--hidden js_modal_restore_succ_overlay"></div> | 325 | <div class="modal-overlay modal-restore-succ-overlay modal-restore-succ-overlay--hidden js_modal_restore_succ_overlay"></div> |
326 | 326 | ||
327 | <section class="modal modal-restore-error modal-restore-error--hidden js_modal_restore_error"> | 327 | <section class="modal modal-restore-error modal-restore-error--hidden js_modal_restore_error"> |
328 | <a class="modal__close modal-restore-error__close js_modal_restore_error_close" href="#"></a> | 328 | <a class="modal__close modal-restore-error__close js_modal_restore_error_close" href="#"></a> |
329 | <h2 class="modal-restore-error__title"> | 329 | <h2 class="modal-restore-error__title"> |
330 | Пользователь не найден | 330 | Пользователь не найден |
331 | </h2> | 331 | </h2> |
332 | <form method="post" class="modal-restore-form restore-form-error"> | 332 | <form method="post" class="modal-restore-form restore-form-error"> |
333 | <label class="form__label restore-label" for="email-pass-err">E-mail | 333 | <label class="form__label restore-label" for="email-pass-err">E-mail |
334 | <span class="required">*</span> | 334 | <span class="required">*</span> |
335 | </label> | 335 | </label> |
336 | <input class="form-input form__email" type="email" id="email-pass-err" name="email" placeholder="Введите ваш e-mail" | 336 | <input class="form-input form__email" type="email" id="email-pass-err" name="email" placeholder="Введите ваш e-mail" |
337 | required> | 337 | required> |
338 | <div class="parts-content-form-bottom modal-auth-bottom"> | 338 | <div class="parts-content-form-bottom modal-auth-bottom"> |
339 | <p class="parts-content-form-bottom__par modal-auth-bottom__note">Даю согласие на обработку персональных | 339 | <p class="parts-content-form-bottom__par modal-auth-bottom__note">Даю согласие на обработку персональных |
340 | данных.</p> | 340 | данных.</p> |
341 | <button class="parts-content-form-bottom__button" type="submit">Восстановить пароль</button> | 341 | <button class="parts-content-form-bottom__button" type="submit">Восстановить пароль</button> |
342 | </div> | 342 | </div> |
343 | </form> | 343 | </form> |
344 | <a class="modal-restore__back js_restore_error_back" href="#">Вернуться на главный экран</a> | 344 | <a class="modal-restore__back js_restore_error_back" href="#">Вернуться на главный экран</a> |
345 | </section> | 345 | </section> |
346 | <div class="modal-overlay modal-restore-error-overlay modal-restore-error-overlay--hidden js_modal_restore_error_overlay"></div> | 346 | <div class="modal-overlay modal-restore-error-overlay modal-restore-error-overlay--hidden js_modal_restore_error_overlay"></div> |
347 | 347 | ||
348 | <section class="modal modal-contact modal-contact--hidden js_modal_contact"> | 348 | <section class="modal modal-contact modal-contact--hidden js_modal_contact"> |
349 | <a class="modal__close modal-contact__close js_modal_contact_close" href="#"></a> | 349 | <a class="modal__close modal-contact__close js_modal_contact_close" href="#"></a> |
350 | <div class="modal-parts-content"> | 350 | <div class="modal-parts-content"> |
351 | <h2 class="modal-parts-content__title"> | 351 | <h2 class="modal-parts-content__title"> |
352 | Свяжитесь с нами | 352 | Свяжитесь с нами |
353 | </h2> | 353 | </h2> |
354 | <p class="modal-contact-type">Отметьте галочкой предпочтительный канал связи</p> | 354 | <p class="modal-contact-type">Отметьте галочкой предпочтительный канал связи</p> |
355 | <form class="modal-parts-content-form" enctype="multipart/form-data" method="post"> | 355 | <form class="modal-parts-content-form" enctype="multipart/form-data" method="post"> |
356 | <div class="parts-content-form-top"> | 356 | <div class="parts-content-form-top"> |
357 | <div class="parts-content-form-top-line-one"> | 357 | <div class="parts-content-form-top-line-one"> |
358 | <label class="form__label" for="name">Ваше имя <span class="required">*</span></label> | 358 | <label class="form__label" for="name">Ваше имя <span class="required">*</span></label> |
359 | <input class="form-input form__name" type="text" id="name" name="name" placeholder="Введите ваше имя" | 359 | <input class="form-input form__name" type="text" id="name" name="name" placeholder="Введите ваше имя" |
360 | required><br> | 360 | required><br> |
361 | 361 | ||
362 | <label class="form__label" for="email">E-mail <span class="required">*</span></label> | 362 | <label class="form__label" for="email">E-mail <span class="required">*</span></label> |
363 | <input class="form-input form__email" type="email" id="email" name="email" | 363 | <input class="form-input form__email" type="email" id="email" name="email" |
364 | placeholder="Введите ваш e-mail" required> | 364 | placeholder="Введите ваш e-mail" required> |
365 | 365 | ||
366 | <label class="form__label" for="number">Телефон</label> | 366 | <label class="form__label" for="number">Телефон</label> |
367 | <input class="form-input form__tel js_input_phone" type="tel" id="number" name="number" | 367 | <input class="form-input form__tel js_input_phone" type="tel" id="number" name="number" |
368 | placeholder="+7 (___) ___-__-__"> | 368 | placeholder="+7 (___) ___-__-__"> |
369 | </div> | 369 | </div> |
370 | 370 | ||
371 | <div class="parts-content-form-top-line-two"> | 371 | <div class="parts-content-form-top-line-two"> |
372 | <label class="form__label form__label-question" for="question">Ваш вопрос <span class="required">*</span></label> | 372 | <label class="form__label form__label-question" for="question">Ваш вопрос <span class="required">*</span></label> |
373 | <textarea class="form-input form__question modal-contact-form-question" id="question" name="question" placeholder="Введите текст" | 373 | <textarea class="form-input form__question modal-contact-form-question" id="question" name="question" placeholder="Введите текст" |
374 | required></textarea><br> | 374 | required></textarea><br> |
375 | </div> | 375 | </div> |
376 | </div> | 376 | </div> |
377 | <div class="checkboxes-connect"> | 377 | <div class="checkboxes-connect"> |
378 | <p class="checkboxes-connect__name">Отметьте галочкой предпочтительный канал связи:</p> | 378 | <p class="checkboxes-connect__name">Отметьте галочкой предпочтительный канал связи:</p> |
379 | <label class="catalog-checkboxes-container label-connect">Телефон | 379 | <label class="catalog-checkboxes-container label-connect">Телефон |
380 | <input type="checkbox" checked="checked" class="check-highload"> | 380 | <input type="checkbox" checked="checked" class="check-highload"> |
381 | <span class="highload2"></span> | 381 | <span class="highload2"></span> |
382 | </label> | 382 | </label> |
383 | <label class="catalog-checkboxes-container label-connect">E-mail | 383 | <label class="catalog-checkboxes-container label-connect">E-mail |
384 | <input type="checkbox" class="check-highload"> | 384 | <input type="checkbox" class="check-highload"> |
385 | <span class="highload2"></span> | 385 | <span class="highload2"></span> |
386 | </label> | 386 | </label> |
387 | <label class="catalog-checkboxes-container label-connect">Whatsapp | 387 | <label class="catalog-checkboxes-container label-connect">Whatsapp |
388 | <input type="checkbox" class="check-highload"> | 388 | <input type="checkbox" class="check-highload"> |
389 | <span class="highload2"></span> | 389 | <span class="highload2"></span> |
390 | </label> | 390 | </label> |
391 | <label class="catalog-checkboxes-container label-connect">Telegram | 391 | <label class="catalog-checkboxes-container label-connect">Telegram |
392 | <input type="checkbox" checked="checked" class="check-highload"> | 392 | <input type="checkbox" checked="checked" class="check-highload"> |
393 | <span class="highload2"></span> | 393 | <span class="highload2"></span> |
394 | </label> | 394 | </label> |
395 | </div> | 395 | </div> |
396 | <div class="parts-content-form-bottom"> | 396 | <div class="parts-content-form-bottom"> |
397 | <p class="parts-content-form-bottom__par">Отправляя форму, подтверждаю свое согласие с политикой | 397 | <p class="parts-content-form-bottom__par">Отправляя форму, подтверждаю свое согласие с политикой |
398 | конфиденциальности и обработки данных</p> | 398 | конфиденциальности и обработки данных</p> |
399 | <button class="parts-content-form-bottom__button" type="submit">Отправить заявку</button> | 399 | <button class="parts-content-form-bottom__button" type="submit">Отправить заявку</button> |
400 | </div> | 400 | </div> |
401 | </form> | 401 | </form> |
402 | </div> | 402 | </div> |
403 | </section> | 403 | </section> |
404 | <div class="modal-overlay modal-contact-overlay modal-contact-overlay--hidden js_modal_contact_overlay"></div> | 404 | <div class="modal-overlay modal-contact-overlay modal-contact-overlay--hidden js_modal_contact_overlay"></div> |
405 | 405 | ||
406 | </header> | 406 | </header> |
407 | 407 | ||
408 | <main> | 408 | <main> |
409 | 409 | ||
410 | @if ($message = Session::get('success')) | 410 | @if ($message = Session::get('success')) |
411 | <section> | 411 | <section> |
412 | <div class="alert alert-success alert-dismissible mt-0" role="alert"> | 412 | <div class="alert alert-success alert-dismissible mt-0" role="alert"> |
413 | <button type="button" class="close" data-dismiss="alert" aria-label="Закрыть"> | 413 | <button type="button" class="close" data-dismiss="alert" aria-label="Закрыть"> |
414 | <span aria-hidden="true">×</span> | 414 | <span aria-hidden="true">×</span> |
415 | </button> | 415 | </button> |
416 | {{ $message }} | 416 | {{ $message }} |
417 | </div> | 417 | </div> |
418 | </section> | 418 | </section> |
419 | @endif | 419 | @endif |
420 | 420 | ||
421 | @if ($errors->any()) | 421 | @if ($errors->any()) |
422 | <section> | 422 | <section> |
423 | <div class="alert alert-danger alert-dismissible mt-4" role="alert"> | 423 | <div class="alert alert-danger alert-dismissible mt-4" role="alert"> |
424 | <button type="button" class="close" data-dismiss="alert" aria-label="Закрыть"> | 424 | <button type="button" class="close" data-dismiss="alert" aria-label="Закрыть"> |
425 | <span aria-hidden="true">×</span> | 425 | <span aria-hidden="true">×</span> |
426 | </button> | 426 | </button> |
427 | <ul class="mb-0"> | 427 | <ul class="mb-0"> |
428 | @foreach ($errors->all() as $error) | 428 | @foreach ($errors->all() as $error) |
429 | <li>{{ $error }}</li> | 429 | <li>{{ $error }}</li> |
430 | @endforeach | 430 | @endforeach |
431 | </ul> | 431 | </ul> |
432 | </div> | 432 | </div> |
433 | </section> | 433 | </section> |
434 | @endif | 434 | @endif |
435 | 435 | ||
436 | <section class="account"> | 436 | <section class="account"> |
437 | <div class="container"> | 437 | <div class="container"> |
438 | <div class="result-links account-top-links"> | 438 | <div class="result-links account-top-links"> |
439 | <a class="result-links__item" href="{{ route('index') }}">Главная</a><span> /</span> | 439 | <a class="result-links__item" href="{{ route('index') }}">Главная</a><span> /</span> |
440 | <a class="result-links__item result-links__item--active" href="{{ route('user.index') }}">Личный кабинет</a> | 440 | <a class="result-links__item result-links__item--active" href="{{ route('user.index') }}">Личный кабинет</a> |
441 | </div> | 441 | </div> |
442 | <h1 class="account-title"> | 442 | <h1 class="account-title"> |
443 | Личный кабинет | 443 | Личный кабинет |
444 | </h1> | 444 | </h1> |
445 | <div class="account-content"> | 445 | <div class="account-content"> |
446 | <div class="account-left"> | 446 | <div class="account-left" style="margin-bottom:35px;"> |
447 | <ul class="catalog__tabs account-tabs"> | 447 | <ul class="catalog__tabs account-tabs"> |
448 | <li class="tab active account-tabs__item js_my_profile" data-tab=".js-tab_1"> | 448 | <li class="tab active_ account-tabs__item js_my_profile_" data-tab=".js-tab_1"> |
449 | <a href="{{ route('user.index') }}">Мой профиль</a> | 449 | <a href="{{ route('user.index') }}">Мой профиль</a> |
450 | </li> | 450 | </li> |
451 | <li class="tab account-tabs__item" data-tab=".js-tab_2"> | 451 | <li class="tab account-tabs__item" data-tab=".js-tab_2"> |
452 | <a href="{{ route('user.index') }}">Категории</a> | 452 | <a href="{{ route('admin.category.index') }}">Категории</a> |
453 | <!--<span>(4)</span>--> | 453 | <!--<span>(4)</span>--> |
454 | </li> | 454 | </li> |
455 | <li class="tab account-tabs__item" data-tab=".js-tab_3"> | 455 | <li class="tab account-tabs__item" data-tab=".js-tab_3"> |
456 | <a href="{{ route('admin.banner.index') }}">Баннеры</a> | 456 | <a href="{{ route('admin.banner.index') }}">Баннеры</a> |
457 | <!--<span>(48)</span>--> | 457 | <!--<span>(48)</span>--> |
458 | </li> | 458 | </li> |
459 | <li class="tab account-tabs__item" data-tab=".js-tab_4"> | 459 | <li class="tab account-tabs__item" data-tab=".js-tab_4"> |
460 | <a href="{{ route('user.index') }}">Новости</a> | 460 | <a href="{{ route('admin.news.index') }}">Новости</a> |
461 | <!--<span>(5)</span>--> | 461 | <!--<span>(5)</span>--> |
462 | </li> | 462 | </li> |
463 | <li class="tab account-tabs__item" data-tab=".js-tab_5"> | 463 | <li class="tab account-tabs__item" data-tab=".js-tab_5"> |
464 | <a href="{{ route('user.index') }}">Товары</a> | 464 | <a href="{{ route('user.index') }}">Товары</a> |
465 | </li> | 465 | </li> |
466 | <li class="tab account-tabs__item" data-tab=".js-tab_5"> | 466 | <li class="tab account-tabs__item" data-tab=".js-tab_5"> |
467 | <a href="{{ route('user.index') }}">Проекты</a> | 467 | <a href="{{ route('admin.project.index') }}">Проекты</a> |
468 | </li> | 468 | </li> |
469 | <li class="tab account-tabs__item" data-tab=".js-tab_5"> | 469 | <li class="tab account-tabs__item" data-tab=".js-tab_5"> |
470 | <a href="{{ route('user.index') }}">Компания</a> | 470 | <a href="{{ route('user.index') }}">Компания</a> |
471 | </li> | 471 | </li> |
472 | </ul> | 472 | </ul> |
473 | <a class="account-left__exit" href="{{ route('auth.logout') }}"> | 473 | <a class="account-left__exit" href="{{ route('auth.logout') }}"> |
474 | Выйти из аккаунта | 474 | Выйти из аккаунта |
475 | </a> | 475 | </a> |
476 | </div> | 476 | </div><br><br> |
477 | <div class="tabs__content catalog-content-items"> | 477 | <div class="tabs__content catalog-content-items"> |
478 | <!-- содержимое мой профиль --> | 478 | <!-- содержимое мой профиль --> |
479 | <div class="tabs__item tabs__item-active js-tab_1_"> | 479 | <div class="tabs__item tabs__item-active js-tab_1_"> |
480 | @yield('content') | 480 | @yield('content') |
481 | </div> <!-- end --> | 481 | </div> <!-- end --> |
482 | </div> | 482 | </div> |
483 | </div> | 483 | </div> |
484 | </div> | 484 | </div> |
485 | </section> | 485 | </section> |
486 | </main> | 486 | </main> |
487 | <footer class="footer"> | 487 | <footer class="footer"> |
488 | <div class="container"> | 488 | <div class="container"> |
489 | <div class="footer__wrapper"> | 489 | <div class="footer__wrapper"> |
490 | <div class="footer__left"> | 490 | <div class="footer__left"> |
491 | <a href="#"> | 491 | <a href="#"> |
492 | <img class="footer__left-logo" src="img/footer-logo.png" alt="Векпром лого" /> | 492 | <img class="footer__left-logo" src="img/footer-logo.png" alt="Векпром лого" /> |
493 | </a> | 493 | </a> |
494 | 494 | ||
495 | <p class="footer__left-par">Металлообрабатывающее, сварочное | 495 | <p class="footer__left-par">Металлообрабатывающее, сварочное |
496 | оборудование, иснтрумент</p> | 496 | оборудование, иснтрумент</p> |
497 | <div class="footer__left-numbers"> | 497 | <div class="footer__left-numbers"> |
498 | <a href="tel:7495215645">+7 (495) 215-6-45</a> | 498 | <a href="tel:7495215645">+7 (495) 215-6-45</a> |
499 | <a href="tel:88005553463" class="number-2">8 (800) 555-34-63</a> | 499 | <a href="tel:88005553463" class="number-2">8 (800) 555-34-63</a> |
500 | </div> | 500 | </div> |
501 | <ul class="footer__left-socials"> | 501 | <ul class="footer__left-socials"> |
502 | <li class="vk"><a href="https://vk.com/" target="_blank"><img src="./img/svg/socials/vk.svg" alt=""></a> | 502 | <li class="vk"><a href="https://vk.com/" target="_blank"><img src="./img/svg/socials/vk.svg" alt=""></a> |
503 | </li> | 503 | </li> |
504 | <li class="youtube"><a href="https://www.youtube.com/" target="_blank"><img | 504 | <li class="youtube"><a href="https://www.youtube.com/" target="_blank"><img |
505 | src="./img/svg/socials/youtube.svg" alt=""></a></li> | 505 | src="./img/svg/socials/youtube.svg" alt=""></a></li> |
506 | <li class="telegram"><a href="https://t.me/" target="_blank"><img src="./img/svg/socials/telegram.svg" | 506 | <li class="telegram"><a href="https://t.me/" target="_blank"><img src="./img/svg/socials/telegram.svg" |
507 | alt=""></a></li> | 507 | alt=""></a></li> |
508 | </ul> | 508 | </ul> |
509 | <div class="footer__left-rating"> | 509 | <div class="footer__left-rating"> |
510 | <p class="yandex">Рейтинг Яндекс</p> | 510 | <p class="yandex">Рейтинг Яндекс</p> |
511 | <div class="stars-wrapper"> | 511 | <div class="stars-wrapper"> |
512 | <svg class="svg-star"> | 512 | <svg class="svg-star"> |
513 | <use xlink:href="./img/icons.svg#star"></use> | 513 | <use xlink:href="./img/icons.svg#star"></use> |
514 | </svg> | 514 | </svg> |
515 | <svg class="svg-star"> | 515 | <svg class="svg-star"> |
516 | <use xlink:href="./img/icons.svg#star"></use> | 516 | <use xlink:href="./img/icons.svg#star"></use> |
517 | </svg> | 517 | </svg> |
518 | <svg class="svg-star"> | 518 | <svg class="svg-star"> |
519 | <use xlink:href="./img/icons.svg#star"></use> | 519 | <use xlink:href="./img/icons.svg#star"></use> |
520 | </svg> | 520 | </svg> |
521 | <svg class="svg-star"> | 521 | <svg class="svg-star"> |
522 | <use xlink:href="./img/icons.svg#star"></use> | 522 | <use xlink:href="./img/icons.svg#star"></use> |
523 | </svg> | 523 | </svg> |
524 | <svg class="svg-star"> | 524 | <svg class="svg-star"> |
525 | <use xlink:href="./img/icons.svg#star"></use> | 525 | <use xlink:href="./img/icons.svg#star"></use> |
526 | </svg> | 526 | </svg> |
527 | <span class="yandex-rating">4,9</span> | 527 | <span class="yandex-rating">4,9</span> |
528 | </div> | 528 | </div> |
529 | </div> | 529 | </div> |
530 | </div> | 530 | </div> |
531 | <div class="footer__centre"> | 531 | <div class="footer__centre"> |
532 | <div class="footer__centre-col footer__centre-col-1"> | 532 | <div class="footer__centre-col footer__centre-col-1"> |
533 | <h4 class="footer__centre-col-title footer-spoiler-button js_comp_btn"> | 533 | <h4 class="footer__centre-col-title footer-spoiler-button js_comp_btn"> |
534 | Компания | 534 | Компания |
535 | </h4> | 535 | </h4> |
536 | <ul class="footer__centre-col-nav footer-acc-panel"> | 536 | <ul class="footer__centre-col-nav footer-acc-panel"> |
537 | <li class="footer__centre-col-nav-item footer-item footer-hidden-comp js_comp_item"><a href="#">О компании</a></li> | 537 | <li class="footer__centre-col-nav-item footer-item footer-hidden-comp js_comp_item"><a href="#">О компании</a></li> |
538 | <li class="footer__centre-col-nav-item footer-item footer-hidden-comp js_comp_item"><a href="#">Услуги</a></li> | 538 | <li class="footer__centre-col-nav-item footer-item footer-hidden-comp js_comp_item"><a href="#">Услуги</a></li> |
539 | <li class="footer__centre-col-nav-item footer-item footer-hidden-comp js_comp_item"><a href="#">Демозал</a></li> | 539 | <li class="footer__centre-col-nav-item footer-item footer-hidden-comp js_comp_item"><a href="#">Демозал</a></li> |
540 | <li class="footer__centre-col-nav-item footer-item footer-hidden-comp js_comp_item"><a href="#">Полезные статьи</a></li> | 540 | <li class="footer__centre-col-nav-item footer-item footer-hidden-comp js_comp_item"><a href="#">Полезные статьи</a></li> |
541 | <li class="footer__centre-col-nav-item footer-item footer-hidden-comp js_comp_item"><a href="#">Сотрудничество</a></li> | 541 | <li class="footer__centre-col-nav-item footer-item footer-hidden-comp js_comp_item"><a href="#">Сотрудничество</a></li> |
542 | <li class="footer__centre-col-nav-item footer-item footer-hidden-comp js_comp_item"><a href="#">Поставщики</a></li> | 542 | <li class="footer__centre-col-nav-item footer-item footer-hidden-comp js_comp_item"><a href="#">Поставщики</a></li> |
543 | <li class="footer__centre-col-nav-item footer-item footer-hidden-comp js_comp_item"><a href="#">Контакты</a></li> | 543 | <li class="footer__centre-col-nav-item footer-item footer-hidden-comp js_comp_item"><a href="#">Контакты</a></li> |
544 | </ul> | 544 | </ul> |
545 | </div> | 545 | </div> |
546 | <div class="footer__centre-col footer__centre-col-2"> | 546 | <div class="footer__centre-col footer__centre-col-2"> |
547 | <h4 class="footer__centre-col-title footer-spoiler-button sp-2 js_comp_btn"> | 547 | <h4 class="footer__centre-col-title footer-spoiler-button sp-2 js_comp_btn"> |
548 | Покупателям | 548 | Покупателям |
549 | </h4> | 549 | </h4> |
550 | <ul class="footer__centre-col-nav footer-acc-panel"> | 550 | <ul class="footer__centre-col-nav footer-acc-panel"> |
551 | <li class="footer__centre-col-nav-item"><a href="#">Каталог</a></li> | 551 | <li class="footer__centre-col-nav-item"><a href="#">Каталог</a></li> |
552 | <li class="footer__centre-col-nav-item"><a href="#">Доставка</a></li> | 552 | <li class="footer__centre-col-nav-item"><a href="#">Доставка</a></li> |
553 | <li class="footer__centre-col-nav-item"><a href="#">Сервис и гарантия</a></li> | 553 | <li class="footer__centre-col-nav-item"><a href="#">Сервис и гарантия</a></li> |
554 | <li class="footer__centre-col-nav-item"><a href="#">Разработка технологий</a></li> | 554 | <li class="footer__centre-col-nav-item"><a href="#">Разработка технологий</a></li> |
555 | <li class="footer__centre-col-nav-item"><a href="#">Лизинг</a></li> | 555 | <li class="footer__centre-col-nav-item"><a href="#">Лизинг</a></li> |
556 | <li class="footer__centre-col-nav-item"><a href="#">Сертификаты</a></li> | 556 | <li class="footer__centre-col-nav-item"><a href="#">Сертификаты</a></li> |
557 | <li class="footer__centre-col-nav-item"><a href="#">Отзывы</a></li> | 557 | <li class="footer__centre-col-nav-item"><a href="#">Отзывы</a></li> |
558 | </ul> | 558 | </ul> |
559 | </div> | 559 | </div> |
560 | <div class="centre__bottom"> | 560 | <div class="centre__bottom"> |
561 | <a class="politica" href="#">Политика конфиденциальности</a> | 561 | <a class="politica" href="#">Политика конфиденциальности</a> |
562 | <p class="years">2008-2023 ПГ ВЕКПРОМ</p> | 562 | <p class="years">2008-2023 ПГ ВЕКПРОМ</p> |
563 | </div> | 563 | </div> |
564 | </div> | 564 | </div> |
565 | 565 | ||
566 | <div class="footer__right"> | 566 | <div class="footer__right"> |
567 | <h6 class="footer__centre-col-title footer__right-title">Контакты</h6> | 567 | <h6 class="footer__centre-col-title footer__right-title">Контакты</h6> |
568 | <div class="footer__right-contacts"> | 568 | <div class="footer__right-contacts"> |
569 | <span class="contacts-main">Почта:</span> | 569 | <span class="contacts-main">Почта:</span> |
570 | <a class="footer__right-contacts-item" href="mailto:info@vekprom.ru">info@vekprom.ru</a> | 570 | <a class="footer__right-contacts-item" href="mailto:info@vekprom.ru">info@vekprom.ru</a> |
571 | <p class="contacts-main footer-second">Офис и демозал в городе Жуковский:</p> | 571 | <p class="contacts-main footer-second">Офис и демозал в городе Жуковский:</p> |
572 | <p class="footer__right-contacts-item"> | 572 | <p class="footer__right-contacts-item"> |
573 | ул. Чкалова, д. 50 | 573 | ул. Чкалова, д. 50 |
574 | </p> | 574 | </p> |
575 | <p class="contacts-main">Офис в городе Жуковский:</p> | 575 | <p class="contacts-main">Офис в городе Жуковский:</p> |
576 | <p class="footer__right-contacts-item"> | 576 | <p class="footer__right-contacts-item"> |
577 | ул. Праволинейная, д 33 | 577 | ул. Праволинейная, д 33 |
578 | </p> | 578 | </p> |
579 | </div> | 579 | </div> |
580 | </div> | 580 | </div> |
581 | </div> | 581 | </div> |
582 | </div> | 582 | </div> |
583 | </footer> | 583 | </footer> |
584 | 584 | ||
585 | </div> | 585 | </div> |
586 | 586 | ||
587 | <script src="https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.js"></script> | 587 | <script src="https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.js"></script> |
588 | <script src="https://unpkg.com/imask"></script> | 588 | <script src="https://unpkg.com/imask"></script> |
589 | <script src="{{ asset('js/main.js') }}"></script> | 589 | <script src="{{ asset('js/main.js') }}"></script> |
590 | </body> | 590 | </body> |
591 | 591 | ||
592 | </html> | 592 | </html> |
593 | 593 |