Commit c5118e5f36e65b1a21919a6850f241f8a4aa3d28

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

Админка сайта - все таблицы

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

app/Http/Controllers/Admin/BannerController.php
... ... @@ -0,0 +1,138 @@
  1 +<?php
  2 +
  3 +namespace App\Http\Controllers\Admin;
  4 +
  5 +use App\Http\Controllers\Controller;
  6 +use App\Models\Banner;
  7 +use Illuminate\Database\Eloquent\Model;
  8 +use Illuminate\Http\Request;
  9 +use Illuminate\Support\Facades\Storage;
  10 +use Illuminate\Support\Facades\Validator;
  11 +
  12 +class BannerController extends Controller
  13 +{
  14 + /**
  15 + * Display a listing of the resource.
  16 + *
  17 + * @return \Illuminate\Http\Response
  18 + */
  19 + public function index()
  20 + {
  21 + $banners = Banner::query()->orderBy('id')->paginate(5);
  22 + return view('admin.banners.index', compact('banners'));
  23 + }
  24 +
  25 + /**
  26 + * Show the form for creating a new resource.
  27 + *
  28 + * @return \Illuminate\Http\Response
  29 + */
  30 + public function create()
  31 + {
  32 + return view('admin.banners.create');
  33 + }
  34 +
  35 + /**
  36 + * Store a newly created resource in storage.
  37 + *
  38 + * @param \Illuminate\Http\Request $request
  39 + * @return \Illuminate\Http\Response
  40 + */
  41 + public function store(Request $request)
  42 + {
  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.banner.create')
  54 + ->withErrors($validator);
  55 + } else {
  56 +
  57 + $banner = new Banner();
  58 + $banner->title = $request->title;
  59 + $banner->text = $request->text;
  60 + $banner->image = $request->file('image')->store('banners', 'public');
  61 + $banner->save();
  62 +
  63 + //$area->fotos()->save($foto_area);
  64 + return redirect()->route('admin.banner.index');
  65 + }
  66 + }
  67 +
  68 + /**
  69 + * Display the specified resource.
  70 + *
  71 + * @param \App\Models\Banner $banner
  72 + * @return \Illuminate\Http\Response
  73 + */
  74 + public function show(Banner $banner)
  75 + {
  76 + //
  77 + }
  78 +
  79 + /**
  80 + * Show the form for editing the specified resource.
  81 + *
  82 + * @param \App\Models\Banner $banner
  83 + * @return \Illuminate\Http\Response
  84 + */
  85 + public function edit(Banner $banner)
  86 + {
  87 + return view('admin.banners.edit', compact($banner));
  88 + }
  89 +
  90 + /**
  91 + * Update the specified resource in storage.
  92 + *
  93 + * @param \Illuminate\Http\Request $request
  94 + * @param \App\Models\Banner $banner
  95 + * @return \Illuminate\Http\Response
  96 + */
  97 + public function update(Request $request, Banner $banner)
  98 + {
  99 + $rules = [
  100 + 'image' => 'required|min:3|max:10000',
  101 + 'title' => 'required|min:3|max:255'
  102 + ];
  103 + $messages = [
  104 + 'required' => 'Поле не может быть пустым!',
  105 + ];
  106 + $validator = Validator::make($request->all(), $rules, $messages);
  107 +
  108 + if ($validator->fails()) {
  109 + return redirect()->route('admin.banner.edit')
  110 + ->withErrors($validator);
  111 + } else {
  112 + $params = $request->all();
  113 + unset($params['image']);
  114 + if ($request->has('image')) {
  115 + Storage::delete($banner->image);
  116 + $params['image'] = $request->file('image')->store('banners', 'public');
  117 + }
  118 +
  119 + $banner->update($params);
  120 + return redirect()->route('admin.banner.index');
  121 + }
  122 + }
  123 +
  124 + /**
  125 + * Remove the specified resource from storage.
  126 + *
  127 + * @param \App\Models\Banner $banner
  128 + * @return \Illuminate\Http\Response
  129 + */
  130 + public function destroy(Banner $banner)
  131 + {
  132 + if (!empty($banner->image)) {
  133 + Storage::delete($banner->image);
  134 + }
  135 + $image->delete();
  136 + return redirect()->route('admin.banner.index');
  137 + }
  138 +}
app/Http/Controllers/Admin/CategoryController.php
... ... @@ -0,0 +1,86 @@
  1 +<?php
  2 +
  3 +namespace App\Http\Controllers\Admin;
  4 +
  5 +use App\Http\Controllers\Controller;
  6 +use App\Models\Category;
  7 +use Illuminate\Http\Request;
  8 +
  9 +class CategoryController extends Controller
  10 +{
  11 + /**
  12 + * Display a listing of the resource.
  13 + *
  14 + * @return \Illuminate\Http\Response
  15 + */
  16 + public function index()
  17 + {
  18 + //
  19 + }
  20 +
  21 + /**
  22 + * Show the form for creating a new resource.
  23 + *
  24 + * @return \Illuminate\Http\Response
  25 + */
  26 + public function create()
  27 + {
  28 + //
  29 + }
  30 +
  31 + /**
  32 + * Store a newly created resource in storage.
  33 + *
  34 + * @param \Illuminate\Http\Request $request
  35 + * @return \Illuminate\Http\Response
  36 + */
  37 + public function store(Request $request)
  38 + {
  39 + //
  40 + }
  41 +
  42 + /**
  43 + * Display the specified resource.
  44 + *
  45 + * @param \App\Models\Category $category
  46 + * @return \Illuminate\Http\Response
  47 + */
  48 + public function show(Category $category)
  49 + {
  50 + //
  51 + }
  52 +
  53 + /**
  54 + * Show the form for editing the specified resource.
  55 + *
  56 + * @param \App\Models\Category $category
  57 + * @return \Illuminate\Http\Response
  58 + */
  59 + public function edit(Category $category)
  60 + {
  61 + //
  62 + }
  63 +
  64 + /**
  65 + * Update the specified resource in storage.
  66 + *
  67 + * @param \Illuminate\Http\Request $request
  68 + * @param \App\Models\Category $category
  69 + * @return \Illuminate\Http\Response
  70 + */
  71 + public function update(Request $request, Category $category)
  72 + {
  73 + //
  74 + }
  75 +
  76 + /**
  77 + * Remove the specified resource from storage.
  78 + *
  79 + * @param \App\Models\Category $category
  80 + * @return \Illuminate\Http\Response
  81 + */
  82 + public function destroy(Category $category)
  83 + {
  84 + //
  85 + }
  86 +}
app/Http/Controllers/Admin/CompanyController.php
... ... @@ -0,0 +1,86 @@
  1 +<?php
  2 +
  3 +namespace App\Http\Controllers\Admin;
  4 +
  5 +use App\Http\Controllers\Controller;
  6 +use App\Models\Company;
  7 +use Illuminate\Http\Request;
  8 +
  9 +class CompanyController extends Controller
  10 +{
  11 + /**
  12 + * Display a listing of the resource.
  13 + *
  14 + * @return \Illuminate\Http\Response
  15 + */
  16 + public function index()
  17 + {
  18 + //
  19 + }
  20 +
  21 + /**
  22 + * Show the form for creating a new resource.
  23 + *
  24 + * @return \Illuminate\Http\Response
  25 + */
  26 + public function create()
  27 + {
  28 + //
  29 + }
  30 +
  31 + /**
  32 + * Store a newly created resource in storage.
  33 + *
  34 + * @param \Illuminate\Http\Request $request
  35 + * @return \Illuminate\Http\Response
  36 + */
  37 + public function store(Request $request)
  38 + {
  39 + //
  40 + }
  41 +
  42 + /**
  43 + * Display the specified resource.
  44 + *
  45 + * @param \App\Models\Company $company
  46 + * @return \Illuminate\Http\Response
  47 + */
  48 + public function show(Company $company)
  49 + {
  50 + //
  51 + }
  52 +
  53 + /**
  54 + * Show the form for editing the specified resource.
  55 + *
  56 + * @param \App\Models\Company $company
  57 + * @return \Illuminate\Http\Response
  58 + */
  59 + public function edit(Company $company)
  60 + {
  61 + //
  62 + }
  63 +
  64 + /**
  65 + * Update the specified resource in storage.
  66 + *
  67 + * @param \Illuminate\Http\Request $request
  68 + * @param \App\Models\Company $company
  69 + * @return \Illuminate\Http\Response
  70 + */
  71 + public function update(Request $request, Company $company)
  72 + {
  73 + //
  74 + }
  75 +
  76 + /**
  77 + * Remove the specified resource from storage.
  78 + *
  79 + * @param \App\Models\Company $company
  80 + * @return \Illuminate\Http\Response
  81 + */
  82 + public function destroy(Company $company)
  83 + {
  84 + //
  85 + }
  86 +}
app/Http/Controllers/Admin/GoodController.php
... ... @@ -0,0 +1,86 @@
  1 +<?php
  2 +
  3 +namespace App\Http\Controllers\Admin;
  4 +
  5 +use App\Http\Controllers\Controller;
  6 +use App\Models\Good;
  7 +use Illuminate\Http\Request;
  8 +
  9 +class GoodController extends Controller
  10 +{
  11 + /**
  12 + * Display a listing of the resource.
  13 + *
  14 + * @return \Illuminate\Http\Response
  15 + */
  16 + public function index()
  17 + {
  18 + //
  19 + }
  20 +
  21 + /**
  22 + * Show the form for creating a new resource.
  23 + *
  24 + * @return \Illuminate\Http\Response
  25 + */
  26 + public function create()
  27 + {
  28 + //
  29 + }
  30 +
  31 + /**
  32 + * Store a newly created resource in storage.
  33 + *
  34 + * @param \Illuminate\Http\Request $request
  35 + * @return \Illuminate\Http\Response
  36 + */
  37 + public function store(Request $request)
  38 + {
  39 + //
  40 + }
  41 +
  42 + /**
  43 + * Display the specified resource.
  44 + *
  45 + * @param \App\Models\Good $good
  46 + * @return \Illuminate\Http\Response
  47 + */
  48 + public function show(Good $good)
  49 + {
  50 + //
  51 + }
  52 +
  53 + /**
  54 + * Show the form for editing the specified resource.
  55 + *
  56 + * @param \App\Models\Good $good
  57 + * @return \Illuminate\Http\Response
  58 + */
  59 + public function edit(Good $good)
  60 + {
  61 + //
  62 + }
  63 +
  64 + /**
  65 + * Update the specified resource in storage.
  66 + *
  67 + * @param \Illuminate\Http\Request $request
  68 + * @param \App\Models\Good $good
  69 + * @return \Illuminate\Http\Response
  70 + */
  71 + public function update(Request $request, Good $good)
  72 + {
  73 + //
  74 + }
  75 +
  76 + /**
  77 + * Remove the specified resource from storage.
  78 + *
  79 + * @param \App\Models\Good $good
  80 + * @return \Illuminate\Http\Response
  81 + */
  82 + public function destroy(Good $good)
  83 + {
  84 + //
  85 + }
  86 +}
app/Http/Controllers/Admin/NewsController.php
... ... @@ -0,0 +1,86 @@
  1 +<?php
  2 +
  3 +namespace App\Http\Controllers\Admin;
  4 +
  5 +use App\Http\Controllers\Controller;
  6 +use App\Models\News;
  7 +use Illuminate\Http\Request;
  8 +
  9 +class NewsController extends Controller
  10 +{
  11 + /**
  12 + * Display a listing of the resource.
  13 + *
  14 + * @return \Illuminate\Http\Response
  15 + */
  16 + public function index()
  17 + {
  18 + //
  19 + }
  20 +
  21 + /**
  22 + * Show the form for creating a new resource.
  23 + *
  24 + * @return \Illuminate\Http\Response
  25 + */
  26 + public function create()
  27 + {
  28 + //
  29 + }
  30 +
  31 + /**
  32 + * Store a newly created resource in storage.
  33 + *
  34 + * @param \Illuminate\Http\Request $request
  35 + * @return \Illuminate\Http\Response
  36 + */
  37 + public function store(Request $request)
  38 + {
  39 + //
  40 + }
  41 +
  42 + /**
  43 + * Display the specified resource.
  44 + *
  45 + * @param \App\Models\News $news
  46 + * @return \Illuminate\Http\Response
  47 + */
  48 + public function show(News $news)
  49 + {
  50 + //
  51 + }
  52 +
  53 + /**
  54 + * Show the form for editing the specified resource.
  55 + *
  56 + * @param \App\Models\News $news
  57 + * @return \Illuminate\Http\Response
  58 + */
  59 + public function edit(News $news)
  60 + {
  61 + //
  62 + }
  63 +
  64 + /**
  65 + * Update the specified resource in storage.
  66 + *
  67 + * @param \Illuminate\Http\Request $request
  68 + * @param \App\Models\News $news
  69 + * @return \Illuminate\Http\Response
  70 + */
  71 + public function update(Request $request, News $news)
  72 + {
  73 + //
  74 + }
  75 +
  76 + /**
  77 + * Remove the specified resource from storage.
  78 + *
  79 + * @param \App\Models\News $news
  80 + * @return \Illuminate\Http\Response
  81 + */
  82 + public function destroy(News $news)
  83 + {
  84 + //
  85 + }
  86 +}
app/Http/Controllers/Admin/ProjectController.php
... ... @@ -0,0 +1,86 @@
  1 +<?php
  2 +
  3 +namespace App\Http\Controllers\Admin;
  4 +
  5 +use App\Http\Controllers\Controller;
  6 +use App\Models\Project;
  7 +use Illuminate\Http\Request;
  8 +
  9 +class ProjectController extends Controller
  10 +{
  11 + /**
  12 + * Display a listing of the resource.
  13 + *
  14 + * @return \Illuminate\Http\Response
  15 + */
  16 + public function index()
  17 + {
  18 + //
  19 + }
  20 +
  21 + /**
  22 + * Show the form for creating a new resource.
  23 + *
  24 + * @return \Illuminate\Http\Response
  25 + */
  26 + public function create()
  27 + {
  28 + //
  29 + }
  30 +
  31 + /**
  32 + * Store a newly created resource in storage.
  33 + *
  34 + * @param \Illuminate\Http\Request $request
  35 + * @return \Illuminate\Http\Response
  36 + */
  37 + public function store(Request $request)
  38 + {
  39 + //
  40 + }
  41 +
  42 + /**
  43 + * Display the specified resource.
  44 + *
  45 + * @param \App\Models\Project $project
  46 + * @return \Illuminate\Http\Response
  47 + */
  48 + public function show(Project $project)
  49 + {
  50 + //
  51 + }
  52 +
  53 + /**
  54 + * Show the form for editing the specified resource.
  55 + *
  56 + * @param \App\Models\Project $project
  57 + * @return \Illuminate\Http\Response
  58 + */
  59 + public function edit(Project $project)
  60 + {
  61 + //
  62 + }
  63 +
  64 + /**
  65 + * Update the specified resource in storage.
  66 + *
  67 + * @param \Illuminate\Http\Request $request
  68 + * @param \App\Models\Project $project
  69 + * @return \Illuminate\Http\Response
  70 + */
  71 + public function update(Request $request, Project $project)
  72 + {
  73 + //
  74 + }
  75 +
  76 + /**
  77 + * Remove the specified resource from storage.
  78 + *
  79 + * @param \App\Models\Project $project
  80 + * @return \Illuminate\Http\Response
  81 + */
  82 + public function destroy(Project $project)
  83 + {
  84 + //
  85 + }
  86 +}
app/Http/Controllers/AdminController.php
... ... @@ -0,0 +1,12 @@
  1 +<?php
  2 +
  3 +namespace App\Http\Controllers;
  4 +
  5 +use Illuminate\Http\Request;
  6 +
  7 +class AdminController extends Controller
  8 +{
  9 + public function index() {
  10 + return view('user.cabinet');
  11 + }
  12 +}
app/Http/Controllers/LoginController.php
... ... @@ -0,0 +1,52 @@
  1 +<?php
  2 +
  3 +namespace App\Http\Controllers;
  4 +
  5 +use Illuminate\Http\Request;
  6 +use Illuminate\Support\Facades\Auth;
  7 +
  8 +class LoginController extends Controller
  9 +{
  10 + public function __construct() {
  11 + $this->middleware('guest')->except('logout');
  12 + }
  13 +
  14 + //Форма входа
  15 + public function login() {
  16 + return view('auth.login');
  17 + }
  18 +
  19 + // Аутентификация
  20 + public function autenticate(Request $request) {
  21 + $request->validate([
  22 + 'email' => 'required|string|email',
  23 + 'password' => 'required|string',
  24 + ]);
  25 +
  26 + $credentials = $request->only('email', 'password');
  27 +
  28 + if (Auth::attempt($credentials, $request->has('remember'))) {
  29 + if (is_null(Auth::user()->email_verified_at)){
  30 + Auth::logout();
  31 + return redirect()
  32 + ->route('auth.vefiry-message')
  33 + ->withErrors('Адрес почты не подтвержден');
  34 + }
  35 +
  36 + return redirect()
  37 + ->route('user.index')
  38 + ->with('success', 'Вы вошли в личный кабинет.');
  39 + }
  40 +
  41 + return redirect()
  42 + ->route('auth.login')
  43 + ->withErrors('Неверный логин или пароль!');
  44 + }
  45 +
  46 + // Выход
  47 + public function logout() {
  48 + Auth::logout();
  49 + return redirect()->route('index')
  50 + ->with('success', 'Вы вышли из личного кабинета');
  51 + }
  52 +}
app/Http/Controllers/RegisterController.php
... ... @@ -0,0 +1,38 @@
  1 +<?php
  2 +
  3 +namespace App\Http\Controllers;
  4 +
  5 +use App\Models\User;
  6 +use Illuminate\Http\Request;
  7 +use Illuminate\Support\Facades\Hash;
  8 +
  9 +class RegisterController extends Controller
  10 +{
  11 + public function __construct() {
  12 + $this->middleware('guest');
  13 + }
  14 +
  15 + // Форма регистрации
  16 + public function register() {
  17 + return view('auth.register');
  18 + }
  19 +
  20 + // Создание пользователя
  21 + public function create(Request $request) {
  22 + $request->validate([
  23 + 'name' => 'required|string|max:255',
  24 + 'email' => 'required|string|email|max:255|unique:users',
  25 + 'password' => 'required|string|min:8|confirmed',
  26 + ]);
  27 +
  28 + User::create([
  29 + 'name' => $request->name,
  30 + 'email' => $request->email,
  31 + 'password' => Hash::make($request->password),
  32 + ]);
  33 +
  34 + return redirect()
  35 + ->route('auth.login')
  36 + ->with('success', 'Вы успешно зарегистрировались');
  37 + }
  38 +}
app/Http/Middleware/Authenticate.php
... ... @@ -15,7 +15,7 @@ class Authenticate extends Middleware
15 15 protected function redirectTo($request)
16 16 {
17 17 if (! $request->expectsJson()) {
18   - return route('login');
  18 + return route('auth.login');
19 19 }
20 20 }
21 21 }
app/Http/Middleware/RedirectIfAuthenticated.php
... ... @@ -23,7 +23,8 @@ class RedirectIfAuthenticated
23 23  
24 24 foreach ($guards as $guard) {
25 25 if (Auth::guard($guard)->check()) {
26   - return redirect(RouteServiceProvider::HOME);
  26 + //return redirect(RouteServiceProvider::HOME);
  27 + return redirect()->route('user.index');
27 28 }
28 29 }
29 30  
app/Models/Banner.php
... ... @@ -8,4 +8,6 @@ use Illuminate\Database\Eloquent\Model;
8 8 class Banner extends Model
9 9 {
10 10 use HasFactory;
  11 +
  12 + protected $fillable = ['title', 'text', 'image'];
11 13 }
public/css/style_table.css
... ... @@ -0,0 +1,32 @@
  1 +.table {
  2 + width: 100%;
  3 + border: none;
  4 + margin-bottom: 20px;
  5 +}
  6 +.table thead th {
  7 + font-weight: bold;
  8 + text-align: left;
  9 + border: none;
  10 + padding: 10px 15px;
  11 + background: #d8d8d8;
  12 + font-size: 14px;
  13 + border-left: 1px solid #ddd;
  14 + border-right: 1px solid #ddd;
  15 +}
  16 +.table tbody td {
  17 + text-align: left;
  18 + border-left: 1px solid #ddd;
  19 + border-right: 1px solid #ddd;
  20 + padding: 10px 15px;
  21 + font-size: 14px;
  22 + vertical-align: top;
  23 +}
  24 +.table thead tr th:first-child, .table tbody tr td:first-child {
  25 + border-left: none;
  26 +}
  27 +.table thead tr th:last-child, .table tbody tr td:last-child {
  28 + border-right: none;
  29 +}
  30 +.table tbody tr:nth-child(even){
  31 + background: #f3f3f3;
  32 +}
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
... ... @@ -0,0 +1,61 @@
  1 +@extends('layout.admin', ['title' => 'Профиль пользователя'])
  2 +
  3 +@section('content')
  4 + <!-- главный экран -->
  5 + <div class="profile-block-wrapper">
  6 + <div class="profile-block">
  7 + <a href="{{ route('admin.banner.create') }}" class="btn banner-container__button" style="margin: 0px;">
  8 + Создать баннер
  9 + </a><br><br>
  10 +
  11 + <table class="table" style="width: 100%">
  12 + <thead>
  13 + <tr>
  14 + <th>ID</th>
  15 + <th>Фото</th>
  16 + <th>Заголовок</th>
  17 + <th>Дата создания</th>
  18 + <th>Действия</th>
  19 + </tr>
  20 + </thead>
  21 + <tbody>
  22 + @if ($banners->count())
  23 + @foreach($banners as $banner)
  24 + <tr>
  25 + <td>{{ $banner->id }}</td>
  26 + <td><? if (empty($banner->image)) {?>Нет фото<?} else {?>
  27 + <!--<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"/>
  29 + <?}?></td>
  30 +
  31 + <td>{{ $banner->title }}</td>
  32 + <td>{{ $banner->created_at }}</td>
  33 + <td> <form action="{{ route('admin.banner.destroy', $banner) }}" method="POST">
  34 + <a href="{{ route('admin.banner.edit', ['banner' => $banner->id]) }}">
  35 + Редактировать
  36 + </a> |
  37 + @csrf
  38 + @method('DELETE')
  39 + <input class=" btn-danger" type="submit" value="Удалить">
  40 + </form>
  41 + </td>
  42 + </tr>
  43 + @endforeach
  44 + @else
  45 + <tr>
  46 + <td>-</td>
  47 + <td>-</td>
  48 + <td>-</td>
  49 + <td>-</td>
  50 + <td>-</td>
  51 + </tr>
  52 + @endif
  53 +
  54 + </tbody>
  55 + </table>
  56 +
  57 + {{ $banners->onEachSide(1)->links('catalogs.paginate') }}
  58 +
  59 + </div>
  60 + </div>
  61 +@endsection
resources/views/admin/profile.blade.php
... ... @@ -0,0 +1,76 @@
  1 +@extends('layout.admin', ['title' => 'Профиль пользователя'])
  2 +
  3 +@section('content')
  4 +<!-- главный экран -->
  5 +<div class="profile-block-wrapper js_profile_data">
  6 + <div class="profile-block">
  7 + <p class="profile-block__title">Контактное лицо</p>
  8 + <p class="profile-block__content">{{ auth()->user()->name }}</p>
  9 + </div>
  10 + <div class="profile-block">
  11 + <p class="profile-block__title">Название компании</p>
  12 + <p class="profile-block__content">ООО “ВЕКПРОМ”</p>
  13 + </div>
  14 + <div class="profile-block">
  15 + <p class="profile-block__title">E-mail</p>
  16 + <p class="profile-block__content">{{ auth()->user()->email }}</p>
  17 + </div>
  18 + <div class="profile-block">
  19 + <p class="profile-block__title">Телефон</p>
  20 + <p class="profile-block__content">+7 965 - 333 - 44 - 44</p>
  21 + </div>
  22 + <!--<div class="profile-block">
  23 + <label class="form__label form__label-file profile-block__title-file" for="file">Данные компании (для юридических
  24 + лиц)
  25 + <svg width="14" height="22" class="svg-file">
  26 + <use xlink:href="./img/icons.svg#input-file-oran"></use>
  27 + </svg>
  28 + <span class="choose-file acc-file">Реквизиты</span>
  29 + </label>
  30 + <input class="form-input" type="file" id="file" name="file">
  31 + </div>-->
  32 + <div class="profile-block-buttons">
  33 + <!--<a class="profile-block-buttons__link-data" href="#">Изменить данные</a>-->
  34 + <a class="profile-block-buttons__link-pass js_profile_pass" href="#">Изменить пароль</a>
  35 + </div>
  36 +</div>
  37 +
  38 +
  39 +<!-- мой профиль - изменить пароль -->
  40 +<div class="change-pass-wrapper change-pass-wrapper--hidden js_change_pass">
  41 + <form class="modal-reg-form profile-pass-change" method="post">
  42 +
  43 + <label class="form__label label-reg-pass error" for="prof-password">Текущий пароль
  44 + <span class="required">*</span>
  45 + </label>
  46 + <input class="form-input auth-pass-err js_reg_pass" type="password"" id="prof-password" name="password"
  47 + placeholder="Введите ваш пароль" required>
  48 + <button class="modal-auth-show-pass prof-show-pass js_reg_show_pass"></button>
  49 +
  50 + <label class="form__label label-reg-pass error" for="prof-password-new">Новый пароль
  51 + <span class="required">*</span>
  52 + </label>
  53 + <input class="form-input auth-pass-err js_prof_show_pass" type="password"" id="prof-password-new" name="password"
  54 + placeholder="Введите ваш пароль" required>
  55 + <button class="modal-auth-show-pass prof-show-pas-sec js_prof_pass_new"></button>
  56 +
  57 + <label class="form__label label-reg auth-label-pass" for="prof-confirm-password">Повторите новый пароль
  58 + <span class="required">*</span>
  59 + <span class="reg-pass-error reg-pass-error--hidden">Ошибка</span>
  60 + </label>
  61 + <input class="form-input reg-pass-conf-input js_pass_conf" type="password"" id="prof-confirm-password"
  62 + name="confirm-password" placeholder="Введите пароль еще раз" required>
  63 + <button class="modal-auth-show-pass prof-show-pas-third js_reg_show_pass_conf"></button>
  64 +
  65 + <div class="parts-content-form-bottom modal-auth-bottom">
  66 +
  67 + <button class="parts-content-form-bottom__button profile-pass-change__btn" type="submit">Изменить пароль</button>
  68 + </div>
  69 + </form>
  70 +</div>
  71 +<!-- мой профиль - изменить пароль - успешно -->
  72 +<div class="pass-change-succ pass-change-succ--hidden">
  73 + <h2 class="pass-change-succ__title">Пароль успешно изменен</h2>
  74 + <a class="pass-change-succ__btn" href="#">Хорошо</a>
  75 +</div>
  76 +@endsection
resources/views/auth/login.blade.php
... ... @@ -0,0 +1,33 @@
  1 +@extends('layout.site', ['title' => 'Вход в личный кабинет'])
  2 +
  3 +@section('content')
  4 + <section class="product-cart">
  5 + <div class="container">
  6 + <h2 class="modal-auth__title">
  7 + Авторизация
  8 + </h2>
  9 + <form method="post" class="modal-auth-form" action="{{ route('auth.auth') }}">
  10 + @csrf
  11 + <label class="form__label auth-label-mail" for="email-auth">E-mail
  12 + <span class="auth-mail-error auth-mail-error--hidden">Ошибка</span>
  13 + </label><br>
  14 + <input class="form-input form__email auth-mail-err" type="email" id="email-auth" name="email" placeholder="Введите ваш e-mail" required value="{{ old('email') ?? '' }}"><br><br>
  15 +
  16 + <label class="form__label auth-label-pass" for="password-auth">Пароль
  17 + <span class="auth-pass-error auth-pass-error--hidden">Ошибка</span>
  18 + </label><br>
  19 + <input class="form-input auth-pass-err js_auth_pass" type="password" id="password-auth" name="password" placeholder="Введите ваш пароль" required>
  20 + <button class="modal-auth-show-pass js_auth_show_pass"></button>
  21 + <div class="parts-content-form-bottom modal-auth-bottom">
  22 + <a class="modal-auth-bottom__reset js_restore_pass" href="#">Забыли пароль?</a>
  23 +
  24 + <label class="form-check-label" for="remember">
  25 + <input type="checkbox" class="form-check-input" name="remember" id="remember">Запомнить меня
  26 + </label>
  27 + <p class="parts-content-form-bottom__par modal-auth-bottom__note">Даю согласие на обработку персональных данных.</p>
  28 + <button class="parts-content-form-bottom__button" type="submit">Войти</button>
  29 + </div>
  30 + </form>
  31 + </div>
  32 + </section>
  33 +@endsection
resources/views/auth/register.blade.php
... ... @@ -0,0 +1,44 @@
  1 +@extends('layout.site', ['title' => 'Регистрация'])
  2 +
  3 +@section('content')
  4 + <section class="product-cart">
  5 + <div class="container">
  6 + <h2 class="modal-reg__title">Регистрация</h2>
  7 + <form class="modal-reg-form" method="post" action="{{ route('auth.register') }}">
  8 + @csrf
  9 + <label class="form__label label-reg" for="name-reg">Ваше имя
  10 + <span class="required">*</span>
  11 + </label><br>
  12 + <input class="form-input form__name" type="text" id="name-reg" name="name" placeholder="Введите ваше имя" required value="{{ old('name') ?? '' }}">
  13 +
  14 + <label class="form__label label-reg-pass reg-mail error" for="email-reg">E-mail
  15 + <span class="required">*</span>
  16 + <span class="reg-mail-error reg-mail-error--hidden">Ошибка</span>
  17 + </label><br>
  18 + <input class="form-input form__email reg-mail-input js_reg_mail_input" type="email" id="email-reg" name="email"
  19 + placeholder="Введите ваш e-mail" value="{{ old('email') ?? '' }}" required>
  20 +
  21 + <label class="form__label label-reg-pass error" for="password-reg">Пароль
  22 + <span class="required">*</span>
  23 + </label><br>
  24 + <input class="form-input auth-pass-err js_reg_pass" type="password" id="password-reg" name="password"
  25 + placeholder="Введите ваш пароль" required>
  26 + <button class="modal-auth-show-pass reg-show-pass js_reg_show_pass"></button><br>
  27 +
  28 + <label class="form__label label-reg auth-label-pass" for="confirm-password-reg">Повторите пароль
  29 + <span class="required">*</span>
  30 + <span class="reg-pass-error reg-pass-error--hidden">Ошибка</span>
  31 + </label><br>
  32 + <input class="form-input reg-pass-conf-input js_pass_conf" type="password" id="confirm-password-reg" name="password_confirmation"
  33 + placeholder="Введите пароль еще раз" required>
  34 + <button class="modal-auth-show-pass reg-show-pass-second js_reg_show_pass_conf"></button>
  35 +
  36 + <div class="parts-content-form-bottom modal-auth-bottom">
  37 + <p class="parts-content-form-bottom__par modal-auth-bottom__note">Даю согласие на обработку персональных данных.
  38 + </p>
  39 + <button class="parts-content-form-bottom__button" type="submit">Отправить заявку</button>
  40 + </div>
  41 + </form>
  42 + </div>
  43 + </section>
  44 +@endsection
resources/views/auth/test.blade.php
... ... @@ -0,0 +1,10 @@
  1 +@extends('layout.site', ['title' => 'Неудачный вход в личный кабинет'])
  2 +
  3 +@section('content')
  4 + <section class="product-cart">
  5 + <div class="container">
  6 + <h2>Авторизация не пройдена!</h2>
  7 + <span>Email не подтвержден.</span>
  8 + </div>
  9 + </section>
  10 +@endsection
resources/views/auth/verify-message.blade.php
... ... @@ -0,0 +1,9 @@
  1 +@extends('layout.site', ['title' => 'Неудачный вход в личный кабинет'])
  2 +
  3 +@section('content')
  4 + <section class="product-cart">
  5 + <div class="container">
  6 +
  7 + </div>
  8 + </section>
  9 +@endsection
resources/views/catalogs/paginate.blade.php
... ... @@ -0,0 +1,53 @@
  1 +@if ($paginator->hasPages())
  2 + <div class="pagination">
  3 + <div class="pagination__inner">
  4 + @if ($paginator->onFirstPage())
  5 + <a class="pagination__btn pagination__btn-prev disabled" href="#">
  6 + <svg width="10" height="17">
  7 + <use xlink:href="{{ asset('images/sprite.svg#slider-arrow')}}"></use>
  8 + </svg>
  9 + </a>
  10 + @else
  11 + <a class="pagination__btn pagination__btn-prev" href="{{ $paginator->previousPageUrl() }}">
  12 + <svg width="10" height="17">
  13 + <use xlink:href="{{ asset('images/sprite.svg#slider-arrow')}}"></use>
  14 + </svg>
  15 + </a>
  16 + @endif
  17 + <ul class="pagination__list">
  18 + @foreach ($elements as $element)
  19 + @if (is_string($element))
  20 +
  21 + <li class="disabled pagination__item"><span>{{ $element }}</span></li>
  22 +
  23 + @endif
  24 + @if (is_array($element))
  25 + @foreach ($element as $page => $url)
  26 + @if ($page == $paginator->currentPage())
  27 +
  28 + <li class="pagination__item"><a class="pagination__link active">{{ $page }}</a></li>
  29 +
  30 + @else
  31 +
  32 + <li class="pagination__item"><a class="pagination__link" href="{{ $url }}">{{ $page }}</a></li>
  33 +
  34 + @endif
  35 + @endforeach
  36 + @endif
  37 + @endforeach
  38 +
  39 + </ul>
  40 + @if ($paginator->hasMorePages())
  41 + <a class="pagination__btn pagination__btn-next" href="{{ $paginator->nextPageUrl() }}">
  42 + <svg width="10" height="17">
  43 + <use xlink:href="{{ asset('images/sprite.svg#slider-arrow')}}"></use>
  44 + </svg></a>
  45 + @else
  46 + <a class="pagination__btn pagination__btn-next disabled" href="#">
  47 + <svg width="10" height="17">
  48 + <use xlink:href="{{ asset('images/sprite.svg#slider-arrow')}}"></use>
  49 + </svg></a>
  50 + @endif
  51 + </div>
  52 + </div>
  53 +@endif
resources/views/layout/admin.blade.php
... ... @@ -0,0 +1,592 @@
  1 +<!DOCTYPE html>
  2 +<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
  3 +
  4 +<head>
  5 + <meta charset="UTF-8">
  6 + <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7 + <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8 + <meta name="csrf-token" content="<?=csrf_token() ?>">
  9 + <title>Vekprom</title>
  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>
  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>
  14 + <link rel="stylesheet" href="{{ asset('css/style.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" />
  17 +</head>
  18 +
  19 +<body>
  20 +
  21 +<div class="wrapper">
  22 +
  23 + <header class="header">
  24 + <div class="header-up">
  25 + <div class="header-up-wrapper">
  26 + <a class="header-mobile-call" href="tel:+79003003030"></a>
  27 + <div class="header-up-left">
  28 + <span class="header-up-left__your-city">Ваш город:</span>
  29 + <p class="header-up-left__city js_city_choose">
  30 + Москва
  31 + </p>
  32 + <svg class="svg-location">
  33 + <use xlink:href="{{ asset('/img/icons.svg#location') }}"></use>
  34 + </svg>
  35 + <p class="header-up-left__address">
  36 + пр-т Коммунистов, 62
  37 + </p>
  38 + </div>
  39 + <nav class="header-up__menu">
  40 + <ul class="header-up__menu-wrapper">
  41 + <li class="header-up__menu-item js_test">О компании</li>
  42 + <li class="header-up__menu-item">Демозал</li>
  43 + <li class="header-up__menu-item">Сервис 24/7</li>
  44 + </ul>
  45 + </nav>
  46 + <div class="header-up-right">
  47 + <a href="#" class="header-up-right__item right-item-compare">Сравнить</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>
  50 + </div>
  51 + </div>
  52 + </div>
  53 + <div class="header-main">
  54 + <div class="container header-main-container">
  55 + <div class="header-main-left">
  56 + <a class="header-main-left__logo" href="#">
  57 + <img src="{{ asset('img/logo.png') }}" alt="Векпром логотип">
  58 + </a>
  59 + <a class="header-main-left__button js-catalog-btn" href="#">Каталог</a>
  60 + <div class="header-main-left-search">
  61 + <input class="header-main-left-search__input" type="search" placeholder="Станов вектор..." />
  62 + <!-- <input class="header-main-left-search__mobile" type="search"> -->
  63 + </div>
  64 + </div>
  65 + <div class="header-main__right">
  66 + <div class="header-main__right-socials">
  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>
  69 + </div>
  70 + <a class="header-main__right-button js_header_button_call">Заказать звонок</a>
  71 + <div class="header-main__right-cart">
  72 + <svg class="svg-cart">
  73 + <use xlink:href="{{ asset('/img/icons.svg#cart') }}"></use>
  74 + </svg>
  75 + <span class="number">2</span>
  76 + </div>
  77 + </div>
  78 + </div>
  79 + </div>
  80 +
  81 + <section class="modal modal-city modal-city--hidden js_modal_city">
  82 + <div class="modal-city-top">
  83 + <h2 class="modal-city-top__title">
  84 + Выбор города
  85 + </h2>
  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="Введите ваш город" />
  88 + </div>
  89 + <a class="modal-city-top__close js_modal_city_close" href="#"></a>
  90 + </div>
  91 + <div class="modal-city-content">
  92 + <ul class="city-main">
  93 + <li class="city-main__item city-main__item--active js_city_item">Москва и Московская область</li>
  94 + <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>
  97 + <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>
  100 + <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>
  103 + </ul>
  104 + <ul class="modal-city-block">
  105 + <li class="modal-city-block__name js_city_item">Адыгея Респ.</li>
  106 + <span class="modal-city-block__letter">A</span>
  107 + <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>
  110 + <li class="modal-city-block__name js_city_item">Архангельская обл.</li>
  111 + <li class="modal-city-block__name js_city_item">Астраханская обл.</li>
  112 + </ul>
  113 + <ul class="modal-city-block">
  114 + <li class="modal-city-block__name js_city_item">Башкортостан Респ.</li>
  115 + <span class="modal-city-block__letter">Б</span>
  116 + <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>
  119 + </ul>
  120 + <ul class="modal-city-block">
  121 + <li class="modal-city-block__name js_city_item">Владимирская обл.</li>
  122 + <span class="modal-city-block__letter">В</span>
  123 + <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>
  126 + </ul>
  127 + <ul class="modal-city-block">
  128 + <li class="modal-city-block__name js_city_item">Дагестан Респ.</li>
  129 + <span class="modal-city-block__letter">Д</span>
  130 + </ul>
  131 + <ul class="modal-city-block">
  132 + <li class="modal-city-block__name js_city_item">Еврейская АО</li>
  133 + <span class="modal-city-block__letter">Е</span>
  134 + </ul>
  135 + <ul class="modal-city-block">
  136 + <li class="modal-city-block__name js_city_item">Забайкальский край.</li>
  137 + <span class="modal-city-block__letter">З</span>
  138 + </ul>
  139 + <ul class="modal-city-block">
  140 + <li class="modal-city-block__name js_city_item">Ивановская обл.</li>
  141 + <span class="modal-city-block__letter">И</span>
  142 + <li class="modal-city-block__name js_city_item">Ингушетия Респ.</li>
  143 + <li class="modal-city-block__name js_city_item">Иркутская обл.</li>
  144 + </ul>
  145 + <ul class="modal-city-block">
  146 + <li class="modal-city-block__name js_city_item">Кабардино-Балкарская Респ.</li>
  147 + <span class="modal-city-block__letter">К</span>
  148 + <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>
  151 + <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>
  154 + <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>
  157 + <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>
  160 + </ul>
  161 + <ul class="modal-city-block">
  162 + <li class="modal-city-block__name js_city_item">Липецкая обл.</li>
  163 + <span class="modal-city-block__letter">Л</span>
  164 + </ul>
  165 + <ul class="modal-city-block">
  166 + <li class="modal-city-block__name js_city_item">Магаданская обл.</li>
  167 + <span class="modal-city-block__letter">М</span>
  168 + <li class="modal-city-block__name js_city_item">Марий Эл Респ.</li>
  169 + <li class="modal-city-block__name js_city_item">Мордовия Респ.</li>
  170 + </ul>
  171 + <ul class="modal-city-block">
  172 + <li class="modal-city-block__name js_city_item">Нижегородская обл.</li>
  173 + <span class="modal-city-block__letter">Н</span>
  174 + <li class="modal-city-block__name js_city_item">Новгородская обл.</li>
  175 + <li class="modal-city-block__name js_city_item">Новосибирская обл.</li>
  176 + </ul>
  177 + <ul class="modal-city-block">
  178 + <li class="modal-city-block__name js_city_item">Омская обл.</li>
  179 + <span class="modal-city-block__letter">О</span>
  180 + <li class="modal-city-block__name js_city_item">Оренбургская обл.</li>
  181 + <li class="modal-city-block__name js_city_item">Орловская обл.</li>
  182 + </ul>
  183 + <ul class="modal-city-block">
  184 + <li class="modal-city-block__name js_city_item">Ростовская обл.</li>
  185 + <span class="modal-city-block__letter">Р</span>
  186 + <li class="modal-city-block__name js_city_item">Рязанская обл.</li>
  187 + </ul>
  188 + <ul class="modal-city-block">
  189 + <li class="modal-city-block__name js_city_item">Самарская</li>
  190 + <span class="modal-city-block__letter">С</span>
  191 + <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>
  194 + <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>
  197 + <li class="modal-city-block__name js_city_item">Смоленская обл.</li>
  198 + </ul>
  199 + <ul class="modal-city-block">
  200 + <li class="modal-city-block__name js_city_item">Удмуртская</li>
  201 + <span class="modal-city-block__letter">У</span>
  202 + <li class="modal-city-block__name js_city_item">Ульяновская</li>
  203 + </ul>
  204 + <ul class="modal-city-block">
  205 + <li class="modal-city-block__name js_city_item">Хабаровский</li>
  206 + <span class="modal-city-block__letter">Х</span>
  207 + <li class="modal-city-block__name js_city_item">Хакасия Респ.</li>
  208 + <li class="modal-city-block__name js_city_item">Ханты-Мансийский Автономный округ - Югра АО.</li>
  209 + </ul>
  210 + <ul class="modal-city-block">
  211 + <li class="modal-city-block__name js_city_item">Челябинская</li>
  212 + <span class="modal-city-block__letter">Ч</span>
  213 + <li class="modal-city-block__name js_city_item">Чеченская Респ.</li>
  214 + <li class="modal-city-block__name js_city_item">Чувашская Республика - Чувашия.</li>
  215 + </ul>
  216 + <ul class="modal-city-block">
  217 + <li class="modal-city-block__name js_city_item">Ямало-Ненецкий АО.</li>
  218 + <span class="modal-city-block__letter">Я</span>
  219 + <li class="modal-city-block__name js_city_item">Ярославская обл.</li>
  220 + </ul>
  221 +
  222 + </div>
  223 + <a class="modal-city__close js_modal_city_close" href="#"></a>
  224 + </section>
  225 + <div class="modal-overlay modal-city-overlay modal-city-overlay--hidden js_modal_city_overlay"></div>
  226 +
  227 +
  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>
  230 + <h2 class="modal-reg__title">Регистрация</h2>
  231 + <form class="modal-reg-form" method="post">
  232 + <label class="form__label label-reg" for="name-reg">Ваше имя
  233 + <span class="required">*</span>
  234 + </label>
  235 + <input class="form-input form__name" type="text" id="name-reg" name="name" placeholder="Введите ваше имя" required>
  236 +
  237 + <label class="form__label label-reg-pass reg-mail error" for="email-reg">E-mail
  238 + <span class="required">*</span>
  239 + <span class="reg-mail-error reg-mail-error--hidden">Ошибка</span>
  240 + </label>
  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>
  243 +
  244 + <label class="form__label label-reg-pass error" for="password-reg">Пароль
  245 + <span class="required">*</span>
  246 + </label>
  247 + <input class="form-input auth-pass-err js_reg_pass" type="password"" id="password-reg" name="password"
  248 + placeholder="Введите ваш пароль" required>
  249 + <button class="modal-auth-show-pass reg-show-pass js_reg_show_pass"></button>
  250 +
  251 + <label class="form__label label-reg auth-label-pass" for="confirm-password-reg">Повторите пароль
  252 + <span class="required">*</span>
  253 + <span class="reg-pass-error reg-pass-error--hidden">Ошибка</span>
  254 + </label>
  255 + <input class="form-input reg-pass-conf-input js_pass_conf" type="password"" id="confirm-password-reg" name="confirm-password"
  256 + placeholder="Введите пароль еще раз" required>
  257 + <button class="modal-auth-show-pass reg-show-pass-second js_reg_show_pass_conf"></button>
  258 +
  259 + <div class="parts-content-form-bottom modal-auth-bottom">
  260 + <a class="modal-auth-bottom__reset js_restore_pass" href="#">Забыли пароль?</a>
  261 + <p class="parts-content-form-bottom__par modal-auth-bottom__note">Даю согласие на обработку персональных данных.
  262 + </p>
  263 + <button class="parts-content-form-bottom__button" type="submit">Отправить заявку</button>
  264 + </div>
  265 + </form>
  266 + <a class="modal-restore__back js_back_inner" href="#">Вернуться на главный экран</a>
  267 + </section>
  268 + <div class="modal-overlay modal-reg-overlay modal-reg-overlay--hidden js_modal_reg_overlay"></div>
  269 +
  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>
  272 + <h2 class="modal-auth__title">
  273 + Авторизация
  274 + </h2>
  275 + <form method="post" class="modal-auth-form">
  276 + <label class="form__label auth-label-mail" for="email-auth">E-mail
  277 + <span class="auth-mail-error auth-mail-error--hidden">Ошибка</span>
  278 + </label>
  279 + <input class="form-input form__email auth-mail-err" type="email" id="email-auth" name="email" placeholder="Введите ваш e-mail" required>
  280 +
  281 + <label class="form__label auth-label-pass" for="password-auth">Пароль
  282 + <span class="auth-pass-error auth-pass-error--hidden">Ошибка</span>
  283 + </label>
  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>
  286 + <div class="parts-content-form-bottom modal-auth-bottom">
  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>
  289 + <button class="parts-content-form-bottom__button" type="submit">Войти</button>
  290 + </div>
  291 + </form>
  292 + </section>
  293 + <div class="modal-overlay modal-auth-overlay modal-auth-overlay--hidden js_modal_auth_overlay"></div>
  294 +
  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>
  297 + <h2 class="modal-restore__title">
  298 + Восстановить пароль
  299 + </h2>
  300 + <form method="post" class="modal-restore-form">
  301 + <label class="form__label restore-label" for="email-restore">E-mail
  302 + <span class="required">*</span>
  303 + </label>
  304 + <input class="form-input form__email" type="email" id="email-restore" name="email"
  305 + placeholder="Введите ваш e-mail" required>
  306 + <div class="parts-content-form-bottom modal-auth-bottom">
  307 + <p class="parts-content-form-bottom__par modal-auth-bottom__note">Даю согласие на обработку персональных данных.</p>
  308 + <button class="parts-content-form-bottom__button" type="submit">Восстановить пароль</button>
  309 + </div>
  310 + </form>
  311 + <a class="modal-restore__back js_restore_back" href="#">Вернуться на главный экран</a>
  312 + </section>
  313 + <div class="modal-overlay modal-restore-overlay modal-restore-overlay--hidden js_modal_restore_overlay"></div>
  314 +
  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>
  317 + <h2 class="modal-restore-succ__title">
  318 + Сообщение отправлено
  319 + </h2>
  320 + <p class="modal-restore-succ__note">Мы отправили ссылку для восстановения доступа к вашему аккаунту на адрес</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>
  323 + <a class="modal-restore-succ__back js_res_succ_back" href="#">Вернуться на главный экран</a>
  324 + </section>
  325 + <div class="modal-overlay modal-restore-succ-overlay modal-restore-succ-overlay--hidden js_modal_restore_succ_overlay"></div>
  326 +
  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>
  329 + <h2 class="modal-restore-error__title">
  330 + Пользователь не найден
  331 + </h2>
  332 + <form method="post" class="modal-restore-form restore-form-error">
  333 + <label class="form__label restore-label" for="email-pass-err">E-mail
  334 + <span class="required">*</span>
  335 + </label>
  336 + <input class="form-input form__email" type="email" id="email-pass-err" name="email" placeholder="Введите ваш e-mail"
  337 + required>
  338 + <div class="parts-content-form-bottom modal-auth-bottom">
  339 + <p class="parts-content-form-bottom__par modal-auth-bottom__note">Даю согласие на обработку персональных
  340 + данных.</p>
  341 + <button class="parts-content-form-bottom__button" type="submit">Восстановить пароль</button>
  342 + </div>
  343 + </form>
  344 + <a class="modal-restore__back js_restore_error_back" href="#">Вернуться на главный экран</a>
  345 + </section>
  346 + <div class="modal-overlay modal-restore-error-overlay modal-restore-error-overlay--hidden js_modal_restore_error_overlay"></div>
  347 +
  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>
  350 + <div class="modal-parts-content">
  351 + <h2 class="modal-parts-content__title">
  352 + Свяжитесь с нами
  353 + </h2>
  354 + <p class="modal-contact-type">Отметьте галочкой предпочтительный канал связи</p>
  355 + <form class="modal-parts-content-form" enctype="multipart/form-data" method="post">
  356 + <div class="parts-content-form-top">
  357 + <div class="parts-content-form-top-line-one">
  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="Введите ваше имя"
  360 + required><br>
  361 +
  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"
  364 + placeholder="Введите ваш e-mail" required>
  365 +
  366 + <label class="form__label" for="number">Телефон</label>
  367 + <input class="form-input form__tel js_input_phone" type="tel" id="number" name="number"
  368 + placeholder="+7 (___) ___-__-__">
  369 + </div>
  370 +
  371 + <div class="parts-content-form-top-line-two">
  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="Введите текст"
  374 + required></textarea><br>
  375 + </div>
  376 + </div>
  377 + <div class="checkboxes-connect">
  378 + <p class="checkboxes-connect__name">Отметьте галочкой предпочтительный канал связи:</p>
  379 + <label class="catalog-checkboxes-container label-connect">Телефон
  380 + <input type="checkbox" checked="checked" class="check-highload">
  381 + <span class="highload2"></span>
  382 + </label>
  383 + <label class="catalog-checkboxes-container label-connect">E-mail
  384 + <input type="checkbox" class="check-highload">
  385 + <span class="highload2"></span>
  386 + </label>
  387 + <label class="catalog-checkboxes-container label-connect">Whatsapp
  388 + <input type="checkbox" class="check-highload">
  389 + <span class="highload2"></span>
  390 + </label>
  391 + <label class="catalog-checkboxes-container label-connect">Telegram
  392 + <input type="checkbox" checked="checked" class="check-highload">
  393 + <span class="highload2"></span>
  394 + </label>
  395 + </div>
  396 + <div class="parts-content-form-bottom">
  397 + <p class="parts-content-form-bottom__par">Отправляя форму, подтверждаю свое согласие с политикой
  398 + конфиденциальности и обработки данных</p>
  399 + <button class="parts-content-form-bottom__button" type="submit">Отправить заявку</button>
  400 + </div>
  401 + </form>
  402 + </div>
  403 + </section>
  404 + <div class="modal-overlay modal-contact-overlay modal-contact-overlay--hidden js_modal_contact_overlay"></div>
  405 +
  406 + </header>
  407 +
  408 + <main>
  409 +
  410 + @if ($message = Session::get('success'))
  411 + <section>
  412 + <div class="alert alert-success alert-dismissible mt-0" role="alert">
  413 + <button type="button" class="close" data-dismiss="alert" aria-label="Закрыть">
  414 + <span aria-hidden="true">&times;</span>
  415 + </button>
  416 + {{ $message }}
  417 + </div>
  418 + </section>
  419 + @endif
  420 +
  421 + @if ($errors->any())
  422 + <section>
  423 + <div class="alert alert-danger alert-dismissible mt-4" role="alert">
  424 + <button type="button" class="close" data-dismiss="alert" aria-label="Закрыть">
  425 + <span aria-hidden="true">&times;</span>
  426 + </button>
  427 + <ul class="mb-0">
  428 + @foreach ($errors->all() as $error)
  429 + <li>{{ $error }}</li>
  430 + @endforeach
  431 + </ul>
  432 + </div>
  433 + </section>
  434 + @endif
  435 +
  436 + <section class="account">
  437 + <div class="container">
  438 + <div class="result-links account-top-links">
  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>
  441 + </div>
  442 + <h1 class="account-title">
  443 + Личный кабинет
  444 + </h1>
  445 + <div class="account-content">
  446 + <div class="account-left">
  447 + <ul class="catalog__tabs account-tabs">
  448 + <li class="tab active account-tabs__item js_my_profile" data-tab=".js-tab_1">
  449 + <a href="{{ route('user.index') }}">Мой профиль</a>
  450 + </li>
  451 + <li class="tab account-tabs__item" data-tab=".js-tab_2">
  452 + <a href="{{ route('user.index') }}">Категории</a>
  453 + <!--<span>(4)</span>-->
  454 + </li>
  455 + <li class="tab account-tabs__item" data-tab=".js-tab_3">
  456 + <a href="{{ route('admin.banner.index') }}">Баннеры</a>
  457 + <!--<span>(48)</span>-->
  458 + </li>
  459 + <li class="tab account-tabs__item" data-tab=".js-tab_4">
  460 + <a href="{{ route('user.index') }}">Новости</a>
  461 + <!--<span>(5)</span>-->
  462 + </li>
  463 + <li class="tab account-tabs__item" data-tab=".js-tab_5">
  464 + <a href="{{ route('user.index') }}">Товары</a>
  465 + </li>
  466 + <li class="tab account-tabs__item" data-tab=".js-tab_5">
  467 + <a href="{{ route('user.index') }}">Проекты</a>
  468 + </li>
  469 + <li class="tab account-tabs__item" data-tab=".js-tab_5">
  470 + <a href="{{ route('user.index') }}">Компания</a>
  471 + </li>
  472 + </ul>
  473 + <a class="account-left__exit" href="{{ route('auth.logout') }}">
  474 + Выйти из аккаунта
  475 + </a>
  476 + </div>
  477 + <div class="tabs__content catalog-content-items">
  478 + <!-- содержимое мой профиль -->
  479 + <div class="tabs__item tabs__item-active js-tab_1_">
  480 + @yield('content')
  481 + </div> <!-- end -->
  482 + </div>
  483 + </div>
  484 + </div>
  485 + </section>
  486 + </main>
  487 + <footer class="footer">
  488 + <div class="container">
  489 + <div class="footer__wrapper">
  490 + <div class="footer__left">
  491 + <a href="#">
  492 + <img class="footer__left-logo" src="img/footer-logo.png" alt="Векпром лого" />
  493 + </a>
  494 +
  495 + <p class="footer__left-par">Металлообрабатывающее, сварочное
  496 + оборудование, иснтрумент</p>
  497 + <div class="footer__left-numbers">
  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>
  500 + </div>
  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>
  503 + </li>
  504 + <li class="youtube"><a href="https://www.youtube.com/" target="_blank"><img
  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"
  507 + alt=""></a></li>
  508 + </ul>
  509 + <div class="footer__left-rating">
  510 + <p class="yandex">Рейтинг Яндекс</p>
  511 + <div class="stars-wrapper">
  512 + <svg class="svg-star">
  513 + <use xlink:href="./img/icons.svg#star"></use>
  514 + </svg>
  515 + <svg class="svg-star">
  516 + <use xlink:href="./img/icons.svg#star"></use>
  517 + </svg>
  518 + <svg class="svg-star">
  519 + <use xlink:href="./img/icons.svg#star"></use>
  520 + </svg>
  521 + <svg class="svg-star">
  522 + <use xlink:href="./img/icons.svg#star"></use>
  523 + </svg>
  524 + <svg class="svg-star">
  525 + <use xlink:href="./img/icons.svg#star"></use>
  526 + </svg>
  527 + <span class="yandex-rating">4,9</span>
  528 + </div>
  529 + </div>
  530 + </div>
  531 + <div class="footer__centre">
  532 + <div class="footer__centre-col footer__centre-col-1">
  533 + <h4 class="footer__centre-col-title footer-spoiler-button js_comp_btn">
  534 + Компания
  535 + </h4>
  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>
  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>
  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>
  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>
  544 + </ul>
  545 + </div>
  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">
  548 + Покупателям
  549 + </h4>
  550 + <ul class="footer__centre-col-nav footer-acc-panel">
  551 + <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>
  554 + <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>
  557 + <li class="footer__centre-col-nav-item"><a href="#">Отзывы</a></li>
  558 + </ul>
  559 + </div>
  560 + <div class="centre__bottom">
  561 + <a class="politica" href="#">Политика конфиденциальности</a>
  562 + <p class="years">2008-2023 ПГ ВЕКПРОМ</p>
  563 + </div>
  564 + </div>
  565 +
  566 + <div class="footer__right">
  567 + <h6 class="footer__centre-col-title footer__right-title">Контакты</h6>
  568 + <div class="footer__right-contacts">
  569 + <span class="contacts-main">Почта:</span>
  570 + <a class="footer__right-contacts-item" href="mailto:info@vekprom.ru">info@vekprom.ru</a>
  571 + <p class="contacts-main footer-second">Офис и демозал в городе Жуковский:</p>
  572 + <p class="footer__right-contacts-item">
  573 + ул. Чкалова, д. 50
  574 + </p>
  575 + <p class="contacts-main">Офис в городе Жуковский:</p>
  576 + <p class="footer__right-contacts-item">
  577 + ул. Праволинейная, д 33
  578 + </p>
  579 + </div>
  580 + </div>
  581 + </div>
  582 + </div>
  583 + </footer>
  584 +
  585 +</div>
  586 +
  587 +<script src="https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.js"></script>
  588 +<script src="https://unpkg.com/imask"></script>
  589 +<script src="{{ asset('js/main.js') }}"></script>
  590 +</body>
  591 +
  592 +</html>
resources/views/user/cabinet.blade.php
... ... @@ -0,0 +1,112 @@
  1 +@extends('layout.admin', ['title' => 'Личный кабинет'])
  2 +
  3 +@section('content')
  4 + <!-- содержимое мой профиль -->
  5 + <div class="tabs__item tabs__item-active js-tab_1">
  6 + <!-- главный экран -->
  7 + <div class="profile-block-wrapper js_profile_data">
  8 + <div class="profile-block">
  9 + <p class="profile-block__title">Контактное лицо</p>
  10 + <p class="profile-block__content">{{ auth()->user()->name }}</p>
  11 + </div>
  12 + <div class="profile-block">
  13 + <p class="profile-block__title">Название компании</p>
  14 + <p class="profile-block__content">ООО “ВЕКПРОМ”</p>
  15 + </div>
  16 + <div class="profile-block">
  17 + <p class="profile-block__title">E-mail</p>
  18 + <p class="profile-block__content">{{ auth()->user()->email }}</p>
  19 + </div>
  20 + <div class="profile-block">
  21 + <p class="profile-block__title">Телефон</p>
  22 + <p class="profile-block__content">+7 965 - 333 - 44 - 44</p>
  23 + </div>
  24 + <!--<div class="profile-block">
  25 + <label class="form__label form__label-file profile-block__title-file" for="file">Данные компании (для юридических
  26 + лиц)
  27 + <svg width="14" height="22" class="svg-file">
  28 + <use xlink:href="./img/icons.svg#input-file-oran"></use>
  29 + </svg>
  30 + <span class="choose-file acc-file">Реквизиты</span>
  31 + </label>
  32 + <input class="form-input" type="file" id="file" name="file">
  33 + </div>-->
  34 + <div class="profile-block-buttons">
  35 + <!--<a class="profile-block-buttons__link-data" href="#">Изменить данные</a>-->
  36 + <a class="profile-block-buttons__link-pass js_profile_pass" href="#">Изменить пароль</a>
  37 + </div>
  38 + </div>
  39 + <!-- мой профиль - изменить пароль -->
  40 + <div class="change-pass-wrapper change-pass-wrapper--hidden js_change_pass">
  41 + <form class="modal-reg-form profile-pass-change" method="post">
  42 +
  43 + <label class="form__label label-reg-pass error" for="prof-password">Текущий пароль
  44 + <span class="required">*</span>
  45 + </label>
  46 + <input class="form-input auth-pass-err js_reg_pass" type="password"" id="prof-password" name="password"
  47 + placeholder="Введите ваш пароль" required>
  48 + <button class="modal-auth-show-pass prof-show-pass js_reg_show_pass"></button>
  49 +
  50 + <label class="form__label label-reg-pass error" for="prof-password-new">Новый пароль
  51 + <span class="required">*</span>
  52 + </label>
  53 + <input class="form-input auth-pass-err js_prof_show_pass" type="password"" id="prof-password-new" name="password"
  54 + placeholder="Введите ваш пароль" required>
  55 + <button class="modal-auth-show-pass prof-show-pas-sec js_prof_pass_new"></button>
  56 +
  57 + <label class="form__label label-reg auth-label-pass" for="prof-confirm-password">Повторите новый пароль
  58 + <span class="required">*</span>
  59 + <span class="reg-pass-error reg-pass-error--hidden">Ошибка</span>
  60 + </label>
  61 + <input class="form-input reg-pass-conf-input js_pass_conf" type="password"" id="prof-confirm-password"
  62 + name="confirm-password" placeholder="Введите пароль еще раз" required>
  63 + <button class="modal-auth-show-pass prof-show-pas-third js_reg_show_pass_conf"></button>
  64 +
  65 + <div class="parts-content-form-bottom modal-auth-bottom">
  66 +
  67 + <button class="parts-content-form-bottom__button profile-pass-change__btn" type="submit">Изменить пароль</button>
  68 + </div>
  69 + </form>
  70 + </div>
  71 + <!-- мой профиль - изменить пароль - успешно -->
  72 + <div class="pass-change-succ pass-change-succ--hidden">
  73 + <h2 class="pass-change-succ__title">Пароль успешно изменен</h2>
  74 + <a class="pass-change-succ__btn" href="#">Хорошо</a>
  75 + </div>
  76 + </div>
  77 + <!-- содержимое мои заказы -->
  78 + <div class="tabs__item js-tab_2">
  79 + <div class="orders-acc-wrapper">
  80 + <div class="orders-acc">
  81 + <p class="orders-acc__content number"><span>Заказ №:</span>5726482949</p>
  82 + <p class="orders-acc__content date"><span>Дата:</span>28.02.2023</p>
  83 + <p class="orders-acc__content sum"><span>Сумма заказа:</span>255 600 ₽</p>
  84 + <a class="orders-acc__btn js_open_accordion" href="#">Посмотреть заказ</a>
  85 + <div class="orders-panel">
  86 + <div class="orders-panel-data">
  87 + <h3 class="orders-panel-data__title">Ваши данные:</h3>
  88 + <p class="orders-panel-data__content name">Алексей Витальевич Кржижановский</p>
  89 + <p class="orders-panel-data__content number">+7 965 114-44-44</p>
  90 + <p class="orders-panel-data__content mail">123465gtyriejkk@mail.ru</p>
  91 + </div>
  92 + <div class="profile-block">
  93 + <label class="form__label form__label-file orders-panel-title" for="file">Данные компании (для юридических
  94 + лиц)
  95 + <svg width="14" height="22" class="svg-file orders-panel-svg-act">
  96 + <use xlink:href="./img/icons.svg#input-file-oran"></use>
  97 + <span class="choose-file acc-file orders-panel-svg-act">ИП Кржижановский</span>
  98 + </svg>
  99 + <svg width="14" height="22" class="svg-file orders-panel-svg">
  100 + <use xlink:href="./img/icons.svg#input-file"></use>
  101 + <span class="choose-file orders-panel-svg">Отсутствуют</span>
  102 + </svg>
  103 + </label>
  104 + <input class="form-input" type="file" id="file" name="file">
  105 + </div>
  106 +
  107 + </div>
  108 + </div>
  109 + </div>
  110 + </div>
  111 +
  112 +@endsection
1 1 <?php
2 2  
  3 +use App\Http\Controllers\Admin\BannerController;
  4 +use App\Http\Controllers\Admin\CategoryController;
  5 +use App\Http\Controllers\Admin\NewsController;
  6 +use App\Http\Controllers\Admin\ProjectController;
  7 +use App\Http\Controllers\AdminController;
  8 +use App\Http\Controllers\LoginController;
3 9 use App\Http\Controllers\MainController;
  10 +use App\Http\Controllers\RegisterController;
4 11 use Illuminate\Support\Facades\Route;
5 12  
6 13 /*
... ... @@ -35,3 +42,79 @@ Route::get(&#39;good&#39;,[MainController::class, &#39;good&#39;])-&gt;name(&#39;good&#39;);
35 42 //Упрощенная карточка товара
36 43 Route::get('simplegood',[MainController::class, 'simple_good'])->name('simplegood');
37 44  
  45 +Route::group([
  46 + 'as' => 'auth.', // имя маршрута, например auth.index
  47 + 'prefix' => 'auth', // префикс маршрута, например auth/index
  48 +], function () {
  49 +// Форма регистрации
  50 + Route::get('register', [RegisterController::class, 'register'])->name('register');
  51 +
  52 +// Создание пользователя
  53 + Route::post('register', [RegisterController::class, 'create'])->name('create');
  54 +
  55 +//Форма входа
  56 + Route::get('login', [LoginController::class, 'login'])->name('login');
  57 +
  58 +// аутентификация
  59 + Route::post('login', [LoginController::class, 'autenticate'])->name('auth');
  60 +
  61 +// выход
  62 + Route::get('logout', [LoginController::class, 'logout'])->name('logout');
  63 +
  64 +//Страница неудачной авторизации
  65 + Route::get('vefiry-message', function () {
  66 + return view('auth.test');
  67 + })->name('vefiry-message');
  68 +
  69 +});
  70 +
  71 +/*
  72 + * Личный кабинет пользователя
  73 + */
  74 +Route::group([
  75 + 'as' => 'user.', // имя маршрута, например user.index
  76 + 'prefix' => 'user', // префикс маршрута, например user/index
  77 + //'namespace' => 'User', // пространство имен контроллеров
  78 + 'middleware' => ['auth'] // один или несколько посредников
  79 +], function () {
  80 + // главная страница
  81 + Route::get('index', [AdminController::class, 'index'])->name('index');
  82 +});
  83 +
  84 +Route::group([
  85 + 'as' => 'admin.', // имя маршрута, например admin.index
  86 + 'prefix' => 'admin', // префикс маршрута, например admin/index
  87 + //'namespace' => 'Admin', // пространство имен контроллеров
  88 + 'middleware' => ['auth'] // один или несколько посредников
  89 +], function () {
  90 + /*
  91 + * CRUD-операции над баннерами
  92 + */
  93 + Route::resource('banner', BannerController::class, ['except' => ['show']]);
  94 +
  95 + /*
  96 + * CRUD-операции над категориями
  97 + */
  98 + Route::resource('category', CategoryController::class, ['except' => ['show']]);
  99 +
  100 + /*
  101 + * CRUD-операции над компанией
  102 + */
  103 + Route::resource('company', BannerController::class, ['except' => ['create', 'store', 'destroy', 'index']]);
  104 +
  105 + /*
  106 + * CRUD-операции над категориями
  107 + */
  108 + Route::resource('goods', CategoryController::class, ['except' => ['show']]);
  109 +
  110 + /*
  111 + * CRUD-операции над категориями
  112 + */
  113 + Route::resource('news', NewsController::class, ['except' => ['show']]);
  114 +
  115 + /*
  116 + * CRUD-операции над категориями
  117 + */
  118 + Route::resource('project', ProjectController::class, ['except' => ['show']]);
  119 +
  120 +});