Commit 7c1e05248205e0e90f2fd4a703d1f8a3e5968a8a

Authored by Андрей Ларионов
1 parent 8de0354752

Формы настройки сайта и форма профиля администратора

Showing 17 changed files with 1226 additions and 2 deletions Side-by-side Diff

app/Http/Controllers/Admin/AdminController.php
... ... @@ -3,11 +3,14 @@
3 3 namespace App\Http\Controllers\Admin;
4 4  
5 5 use App\Http\Controllers\Controller;
  6 +use App\Http\Requests\CompanyRequest;
  7 +use App\Models\Company;
6 8 use App\Models\Employer;
7 9 use App\Models\User;
8 10 use Illuminate\Http\Request;
9 11 use Illuminate\Support\Facades\Auth;
10 12 use Illuminate\Support\Facades\Hash;
  13 +use Illuminate\Support\Facades\Storage;
11 14 use Illuminate\Support\Facades\Validator;
12 15  
13 16 class AdminController extends Controller
... ... @@ -159,4 +162,49 @@ class AdminController extends Controller
159 162 }
160 163 }
161 164  
  165 + public function profile() {
  166 + $id = Auth::user()->id;
  167 + $user = User::find($id);
  168 +
  169 + return view('admin.profile', compact('user'));
  170 + }
  171 +
  172 + public function store_profile(Request $request) {
  173 + $id = Auth::user()->id;
  174 + $user = User::find($id);
  175 +
  176 + return redirect()->route('admin.profile');
  177 + }
  178 +
  179 + public function config_form() {
  180 + $config = Company::find(1);
  181 + return view('admin.config', compact('config'));
  182 + }
  183 +
  184 + public function store_config(CompanyRequest $request) {
  185 + $config = Company::find(1);
  186 +
  187 + $params = $request->all();
  188 + unset($params['logo']);
  189 + unset($params['image']);
  190 +
  191 + if ($request->has('logo')) {
  192 + Storage::delete($config->logo);
  193 + $params['logo'] = $request->file('logo')->store('config', 'public');
  194 + }
  195 +
  196 + if ($request->has('image')) {
  197 + Storage::delete($config->image);
  198 + $params['image'] = $request->file('image')->store('config', 'public');
  199 + }
  200 +
  201 + if (is_null($config)) {
  202 + Company::create($params);
  203 + } else {
  204 + $config->update($params);
  205 + }
  206 +
  207 + return redirect()->route('admin.config');
  208 + }
  209 +
162 210 }
app/Http/Controllers/Admin/CompanyController.php
... ... @@ -0,0 +1,11 @@
  1 +<?php
  2 +
  3 +namespace App\Http\Controllers\Admin;
  4 +
  5 +use App\Http\Controllers\Controller;
  6 +use Illuminate\Http\Request;
  7 +
  8 +class CompanyController extends Controller
  9 +{
  10 + //
  11 +}
app/Http/Controllers/CompanyController.php
... ... @@ -0,0 +1,10 @@
  1 +<?php
  2 +
  3 +namespace App\Http\Controllers;
  4 +
  5 +use Illuminate\Http\Request;
  6 +
  7 +class CompanyController extends Controller
  8 +{
  9 + //
  10 +}
app/Http/Requests/CompanyRequest.php
... ... @@ -0,0 +1,54 @@
  1 +<?php
  2 +
  3 +namespace App\Http\Requests;
  4 +
  5 +use Illuminate\Foundation\Http\FormRequest;
  6 +
  7 +class CompanyRequest 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:1|max:255',
  28 + 'email' => 'required|email|min:5',
  29 + 'logo' => [
  30 + 'mimes:jpeg,jpg,png,ico',
  31 + 'max:10000'
  32 + ],
  33 + 'image' => [
  34 + 'mimes:jpeg,jpg,png',
  35 + 'max:10000'
  36 + ],
  37 + ];
  38 + }
  39 +
  40 + public function messages() {
  41 + return [
  42 + 'required' => 'Поле :attribute обязательно для ввода',
  43 + 'min' => [
  44 + 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
  45 + 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
  46 + ],
  47 + 'max' => [
  48 + 'string' => 'Поле «:attribute» должно быть не больше :max символов',
  49 + 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
  50 + ],
  51 + 'email' => 'Это поле должно быть формата email',
  52 + ];
  53 + }
  54 +}
app/Models/Answer.php
... ... @@ -0,0 +1,11 @@
  1 +<?php
  2 +
  3 +namespace App\Models;
  4 +
  5 +use Illuminate\Database\Eloquent\Factories\HasFactory;
  6 +use Illuminate\Database\Eloquent\Model;
  7 +
  8 +class Answer extends Model
  9 +{
  10 + use HasFactory;
  11 +}
app/Models/Company.php
... ... @@ -0,0 +1,26 @@
  1 +<?php
  2 +
  3 +namespace App\Models;
  4 +
  5 +use Illuminate\Database\Eloquent\Factories\HasFactory;
  6 +use Illuminate\Database\Eloquent\Model;
  7 +
  8 +class Company extends Model
  9 +{
  10 + use HasFactory;
  11 +
  12 + protected $fillable = [
  13 + 'name',
  14 + 'address',
  15 + 'fio_director',
  16 + 'email',
  17 + 'telephone',
  18 + 'site',
  19 + 'telegram',
  20 + 'vkontact',
  21 + 'logo',
  22 + 'image',
  23 + 'map',
  24 + 'text',
  25 + ];
  26 +}
app/Models/Contacts.php
... ... @@ -0,0 +1,11 @@
  1 +<?php
  2 +
  3 +namespace App\Models;
  4 +
  5 +use Illuminate\Database\Eloquent\Factories\HasFactory;
  6 +use Illuminate\Database\Eloquent\Model;
  7 +
  8 +class Contacts extends Model
  9 +{
  10 + use HasFactory;
  11 +}
... ... @@ -0,0 +1,11 @@
  1 +<?php
  2 +
  3 +namespace App\Models;
  4 +
  5 +use Illuminate\Database\Eloquent\Factories\HasFactory;
  6 +use Illuminate\Database\Eloquent\Model;
  7 +
  8 +class Flot extends Model
  9 +{
  10 + use HasFactory;
  11 +}
database/migrations/2023_05_22_084553_create_contacts_table.php
... ... @@ -0,0 +1,34 @@
  1 +<?php
  2 +
  3 +use Illuminate\Database\Migrations\Migration;
  4 +use Illuminate\Database\Schema\Blueprint;
  5 +use Illuminate\Support\Facades\Schema;
  6 +
  7 +return new class extends Migration
  8 +{
  9 + /**
  10 + * Run the migrations.
  11 + *
  12 + * @return void
  13 + */
  14 + public function up()
  15 + {
  16 + Schema::create('contacts', function (Blueprint $table) {
  17 + $table->id();
  18 + $table->string('name', 255)->nullable(true);
  19 + $table->boolean('is_email')->default(false);
  20 + $table->bigInteger('employer_id')->nullable(false);
  21 + $table->timestamps();
  22 + });
  23 + }
  24 +
  25 + /**
  26 + * Reverse the migrations.
  27 + *
  28 + * @return void
  29 + */
  30 + public function down()
  31 + {
  32 + Schema::dropIfExists('contacts');
  33 + }
  34 +};
database/migrations/2023_05_22_084651_create_flots_table.php
... ... @@ -0,0 +1,35 @@
  1 +<?php
  2 +
  3 +use Illuminate\Database\Migrations\Migration;
  4 +use Illuminate\Database\Schema\Blueprint;
  5 +use Illuminate\Support\Facades\Schema;
  6 +
  7 +return new class extends Migration
  8 +{
  9 + /**
  10 + * Run the migrations.
  11 + *
  12 + * @return void
  13 + */
  14 + public function up()
  15 + {
  16 + Schema::create('flots', function (Blueprint $table) {
  17 + $table->id();
  18 + $table->string('name', 255)->nullable(true);
  19 + $table->text('text')->nullable(true);
  20 + $table->string('image', 255)->nullable(true);
  21 + $table->bigInteger('employer_id')->nullable(false);
  22 + $table->timestamps();
  23 + });
  24 + }
  25 +
  26 + /**
  27 + * Reverse the migrations.
  28 + *
  29 + * @return void
  30 + */
  31 + public function down()
  32 + {
  33 + Schema::dropIfExists('flots');
  34 + }
  35 +};
database/migrations/2023_05_22_084739_create_answers_table.php
... ... @@ -0,0 +1,39 @@
  1 +<?php
  2 +
  3 +use Illuminate\Database\Migrations\Migration;
  4 +use Illuminate\Database\Schema\Blueprint;
  5 +use Illuminate\Support\Facades\Schema;
  6 +
  7 +return new class extends Migration
  8 +{
  9 + /**
  10 + * Run the migrations.
  11 + *
  12 + * @return void
  13 + */
  14 + public function up()
  15 + {
  16 + Schema::create('answers', function (Blueprint $table) {
  17 + $table->id();
  18 + $table->bigInteger('employer_id')->nullable(false);
  19 + $table->integer('plus')->default(0);
  20 + $table->integer('minus')->default(0);
  21 + $table->integer('rate')->nullable(true);
  22 + $table->string('title', 255)->nullable(true);
  23 + $table->string('text', 255)->nullable(true);
  24 + $table->boolean('is_moderate')->default(false);
  25 + $table->bigInteger('user_id')->nullable(false);
  26 + $table->timestamps();
  27 + });
  28 + }
  29 +
  30 + /**
  31 + * Reverse the migrations.
  32 + *
  33 + * @return void
  34 + */
  35 + public function down()
  36 + {
  37 + Schema::dropIfExists('answers');
  38 + }
  39 +};
database/migrations/2023_05_22_085010_create_companies_table.php
... ... @@ -0,0 +1,43 @@
  1 +<?php
  2 +
  3 +use Illuminate\Database\Migrations\Migration;
  4 +use Illuminate\Database\Schema\Blueprint;
  5 +use Illuminate\Support\Facades\Schema;
  6 +
  7 +return new class extends Migration
  8 +{
  9 + /**
  10 + * Run the migrations.
  11 + *
  12 + * @return void
  13 + */
  14 + public function up()
  15 + {
  16 + Schema::create('companies', function (Blueprint $table) {
  17 + $table->id();
  18 + $table->string('name', 255)->nullable(true);
  19 + $table->string('address', 255)->nullable(true);
  20 + $table->string('fio_director', 255)->nullable(true);
  21 + $table->string('email', 255)->nullable(true);
  22 + $table->string('telephone', 255)->nullable(true);
  23 + $table->string('site', 255)->nullable(true);
  24 + $table->string('telegram', 255)->nullable(true);
  25 + $table->string('vkontact', 255)->nullable(true);
  26 + $table->string('logo', 255)->nullable(true);
  27 + $table->string('image', 255)->nullable(true);
  28 + $table->string('map', 255)->nullable(true);
  29 + $table->text('text')->nullable(true);
  30 + $table->timestamps();
  31 + });
  32 + }
  33 +
  34 + /**
  35 + * Reverse the migrations.
  36 + *
  37 + * @return void
  38 + */
  39 + public function down()
  40 + {
  41 + Schema::dropIfExists('companies');
  42 + }
  43 +};
resources/views/admin/config.blade.php
... ... @@ -0,0 +1,189 @@
  1 +@extends('layout.admin', ['title' => 'Админка - Настройки'])
  2 +
  3 +@section('content')
  4 + <h4 class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300">
  5 + Реквизиты сайта (конфигурация)
  6 + </h4>
  7 + <form action="" method="POST" enctype="multipart/form-data">
  8 + @csrf
  9 +
  10 + <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800">
  11 + <label class="block text-sm">
  12 + <span class="text-gray-700 dark:text-gray-400">Имя компании</span>
  13 + <input name="name" id="name"
  14 + class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
  15 + placeholder="Имя компании" value="{{ old('name') ?? $config->name ?? '' }}"
  16 + />
  17 + @error('name')
  18 + <span class="text-xs text-red-600 dark:text-red-400">
  19 + {{ $message }}
  20 + </span>
  21 + @enderror
  22 + </label><br>
  23 +
  24 + <label class="block text-sm">
  25 + <span class="text-gray-700 dark:text-gray-400">Адрес</span>
  26 + <input name="address" id="address"
  27 + class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
  28 + placeholder="Адрес" value="{{ old('address') ?? $config->address ?? '' }}"
  29 + />
  30 + @error('address')
  31 + <span class="text-xs text-red-600 dark:text-red-400">
  32 + {{ $message }}
  33 + </span>
  34 + @enderror
  35 + </label><br>
  36 +
  37 + <label class="block text-sm">
  38 + <span class="text-gray-700 dark:text-gray-400">ФИО директора компании</span>
  39 + <input name="fio_director" id="fio_director"
  40 + class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
  41 + placeholder="ФИО директора" value="{{ old('fio_director') ?? $config->fio_director ?? '' }}"
  42 + />
  43 + @error('fio_director')
  44 + <span class="text-xs text-red-600 dark:text-red-400">
  45 + {{ $message }}
  46 + </span>
  47 + @enderror
  48 + </label><br>
  49 +
  50 + <label class="block text-sm">
  51 + <span class="text-gray-700 dark:text-gray-400">Email</span>
  52 + <input name="email" id="email"
  53 + class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
  54 + placeholder="Почта" value="{{ old('email') ?? $config->email ?? '' }}"
  55 + />
  56 + @error('email')
  57 + <span class="text-xs text-red-600 dark:text-red-400">
  58 + {{ $message }}
  59 + </span>
  60 + @enderror
  61 + </label><br>
  62 +
  63 + <label class="block text-sm">
  64 + <span class="text-gray-700 dark:text-gray-400">Телефон</span>
  65 + <input name="telephone" id="telephone"
  66 + class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
  67 + placeholder="Телефон" value="{{ old('telephone') ?? $config->telephone ?? '' }}"
  68 + />
  69 + @error('telephone')
  70 + <span class="text-xs text-red-600 dark:text-red-400">
  71 + {{ $message }}
  72 + </span>
  73 + @enderror
  74 + </label><br>
  75 +
  76 + <label class="block text-sm">
  77 + <span class="text-gray-700 dark:text-gray-400">Сайт</span>
  78 + <input name="site" id="site"
  79 + class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
  80 + placeholder="Сайт" value="{{ old('site') ?? $config->site ?? '' }}"
  81 + />
  82 + @error('site')
  83 + <span class="text-xs text-red-600 dark:text-red-400">
  84 + {{ $message }}
  85 + </span>
  86 + @enderror
  87 + </label><br>
  88 +
  89 + <label class="block text-sm">
  90 + <span class="text-gray-700 dark:text-gray-400">Телеграм</span>
  91 + <input name="telegram" id="telegram"
  92 + class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
  93 + placeholder="Телеграм линк" value="{{ old('telegram') ?? $config->telegram ?? '' }}"
  94 + />
  95 + @error('telegram')
  96 + <span class="text-xs text-red-600 dark:text-red-400">
  97 + {{ $message }}
  98 + </span>
  99 + @enderror
  100 + </label><br>
  101 +
  102 + <label class="block text-sm">
  103 + <span class="text-gray-700 dark:text-gray-400">Вконтакте</span>
  104 + <input name="vkontact" id="vkontact"
  105 + class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
  106 + placeholder="Вконтакте линк" value="{{ old('vkontact') ?? $config->vkontact ?? '' }}"
  107 + />
  108 + @error('vkontact')
  109 + <span class="text-xs text-red-600 dark:text-red-400">
  110 + {{ $message }}
  111 + </span>
  112 + @enderror
  113 + </label><br>
  114 +
  115 + <label class="block text-sm">
  116 + <span class="text-gray-700 dark:text-gray-400">Лого</span>
  117 + <input name="logo" id="logo" type="file"
  118 + class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
  119 + placeholder="Лого" value="{{ old('logo') ?? $config->logo ?? '' }}"
  120 + />
  121 +
  122 + @if (isset($config->logo))
  123 + <img src="<?=asset(Storage::url($config->logo))?>" width="150"/>
  124 + @endif
  125 +
  126 + @error('logo')
  127 + <span class="text-xs text-red-600 dark:text-red-400">
  128 + {{ $message }}
  129 + </span>
  130 + @enderror
  131 + </label><br>
  132 +
  133 + <label class="block text-sm">
  134 + <span class="text-gray-700 dark:text-gray-400">Картинка</span>
  135 + <input name="image" id="image" type="file"
  136 + class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
  137 + placeholder="Картинка"
  138 + />
  139 +
  140 + @if (isset($config->image))
  141 + <img src="<?=asset(Storage::url($config->image))?>" width="150"/>
  142 + @endif
  143 +
  144 +
  145 + @error('image')
  146 + <span class="text-xs text-red-600 dark:text-red-400">
  147 + {{ $message }}
  148 + </span>
  149 + @enderror
  150 + </label><br>
  151 +
  152 + <label class="block text-sm">
  153 + <span class="text-gray-700 dark:text-gray-400">Карта</span>
  154 + <input name="map" id="map"
  155 + class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
  156 + placeholder="Карта" value="{{ old('map') ?? $config->map ?? '' }}"
  157 + />
  158 + @error('map')
  159 + <span class="text-xs text-red-600 dark:text-red-400">
  160 + {{ $message }}
  161 + </span>
  162 + @enderror
  163 + </label><br>
  164 +
  165 + <label class="block text-sm">
  166 + <span class="text-gray-700 dark:text-gray-400">Описание</span>
  167 + <textarea id="text" name="text"
  168 + class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-textarea focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray"
  169 + rows="3"
  170 + placeholder="Описание"
  171 + >{{ old('text') ?? $config->text ?? '' }}</textarea>
  172 +
  173 + @error('text')
  174 + <span class="text-xs text-red-600 dark:text-red-400">
  175 + {{ $message }}
  176 + </span>
  177 + @enderror
  178 + </label><br>
  179 +
  180 + <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4">
  181 + <div>
  182 + <button class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple">
  183 + Сохранить
  184 + </button>
  185 + </div>
  186 + </div>
  187 + </div>
  188 + </form>
  189 +@endsection
resources/views/admin/profile.blade.php
... ... @@ -0,0 +1,350 @@
  1 +@extends('layout.admin', ['title' => 'Админка - Профиль'])
  2 +
  3 +@section('content')
  4 + <h4 class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300">
  5 + Личные данные
  6 + </h4>
  7 + <form method="POST" action="">
  8 + <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800">
  9 + <label class="block text-sm">
  10 + <span class="text-gray-700 dark:text-gray-400">Имя/Псевдоним/Имя компании</span>
  11 + <input name="name" id="name"
  12 + class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
  13 + placeholder="Псевдоним для админки" value="{{ old('name') ?? $user->name ?? '' }}"
  14 + />
  15 + @error('name')
  16 + <span class="text-xs text-red-600 dark:text-red-400">
  17 + {{ $message }}
  18 + </span>
  19 + @enderror
  20 + </label><br>
  21 +
  22 + <label class="block text-sm">
  23 + <span class="text-gray-700 dark:text-gray-400">Email</span>
  24 + <input name="email" id="email"
  25 + class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
  26 + placeholder="Почта" value="{{ old('email') ?? $config->email ?? '' }}"
  27 + />
  28 + @error('email')
  29 + <span class="text-xs text-red-600 dark:text-red-400">
  30 + {{ $message }}
  31 + </span>
  32 + @enderror
  33 + </label><br>
  34 +
  35 + <label class="block text-sm">
  36 + <span class="text-gray-700 dark:text-gray-400">Телефон</span>
  37 + <input name="telephone" id="telephone"
  38 + class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
  39 + placeholder="Телефон" value="{{ old('telephone') ?? $user->telephone ?? '' }}"
  40 + />
  41 + @error('telephone')
  42 + <span class="text-xs text-red-600 dark:text-red-400">
  43 + {{ $message }}
  44 + </span>
  45 + @enderror
  46 + </label><br>
  47 +
  48 + <label class="block text-sm">
  49 + <span class="text-gray-700 dark:text-gray-400">Фамилия</span>
  50 + <input name="surname" id="surname"
  51 + class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
  52 + placeholder="Фамилия" value="{{ old('surname') ?? $user->surname ?? '' }}"
  53 + />
  54 + @error('surname')
  55 + <span class="text-xs text-red-600 dark:text-red-400">
  56 + {{ $message }}
  57 + </span>
  58 + @enderror
  59 + </label><br>
  60 +
  61 + <label class="block text-sm">
  62 + <span class="text-gray-700 dark:text-gray-400">Имя человека</span>
  63 + <input name="name_man" id="name_man"
  64 + class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
  65 + placeholder="Имя человека" value="{{ old('name_man') ?? $user->name_man ?? '' }}"
  66 + />
  67 + @error('name_man')
  68 + <span class="text-xs text-red-600 dark:text-red-400">
  69 + {{ $message }}
  70 + </span>
  71 + @enderror
  72 + </label><br>
  73 +
  74 + <label class="block text-sm">
  75 + <span class="text-gray-700 dark:text-gray-400">Отчество</span>
  76 + <input name="surname2" id="surname2"
  77 + class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
  78 + placeholder="Отчество" value="{{ old('surname2') ?? $user->surname2 ?? '' }}"
  79 + />
  80 + @error('surname2')
  81 + <span class="text-xs text-red-600 dark:text-red-400">
  82 + {{ $message }}
  83 + </span>
  84 + @enderror
  85 + </label><br>
  86 +
  87 + <div class="mt-4 text-sm">
  88 + <span class="text-gray-700 dark:text-gray-400">
  89 + Тип пользователя
  90 + </span>
  91 + <div class="mt-2">
  92 + <label class="inline-flex items-center text-gray-600 dark:text-gray-400">
  93 + <input
  94 + type="radio"
  95 + class="text-purple-600 form-radio focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray"
  96 + name="is_worker"
  97 + value="1"
  98 + <? if ($user->is_worker == 1) echo "checked"; ?>
  99 + />
  100 + <span class="ml-2">Работник</span>
  101 + </label>
  102 + <label class="inline-flex items-center ml-6 text-gray-600 dark:text-gray-400">
  103 + <input
  104 + type="radio"
  105 + class="text-purple-600 form-radio focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray"
  106 + name="is_worker"
  107 + value="0"
  108 + <? if ($user->is_worker == 0) echo "checked"; ?>
  109 + />
  110 + <span class="ml-2">Работодатель</span>
  111 + </label>
  112 + </div>
  113 + </div><br>
  114 +
  115 + <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4">
  116 + <div>
  117 + <button type="submit" class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple">
  118 + Сохранить
  119 + </button>
  120 + <a class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple">
  121 + Сменить пароль
  122 + </a>
  123 + </div>
  124 + </div>
  125 + </div>
  126 + </form>
  127 + <!--
  128 + <label class="block mt-4 text-sm">
  129 + <span class="text-gray-700 dark:text-gray-400">
  130 + Requested Limit
  131 + </span>
  132 + <select
  133 + class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-select focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray"
  134 + >
  135 + <option>$1,000</option>
  136 + <option>$5,000</option>
  137 + <option>$10,000</option>
  138 + <option>$25,000</option>
  139 + </select>
  140 + </label>
  141 +
  142 + <label class="block mt-4 text-sm">
  143 + <span class="text-gray-700 dark:text-gray-400">
  144 + Multiselect
  145 + </span>
  146 + <select
  147 + class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-multiselect focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray"
  148 + multiple
  149 + >
  150 + <option>Option 1</option>
  151 + <option>Option 2</option>
  152 + <option>Option 3</option>
  153 + <option>Option 4</option>
  154 + <option>Option 5</option>
  155 + </select>
  156 + </label>
  157 +
  158 + <label class="block mt-4 text-sm">
  159 + <span class="text-gray-700 dark:text-gray-400">Message</span>
  160 + <textarea
  161 + class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-textarea focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray"
  162 + rows="3"
  163 + placeholder="Enter some long form content."
  164 + ></textarea>
  165 + </label>
  166 +
  167 + <div class="flex mt-6 text-sm">
  168 + <label class="flex items-center dark:text-gray-400">
  169 + <input
  170 + type="checkbox"
  171 + class="text-purple-600 form-checkbox focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray"
  172 + />
  173 + <span class="ml-2">
  174 + I agree to the
  175 + <span class="underline">privacy policy</span>
  176 + </span>
  177 + </label>
  178 + </div>
  179 + </div>
  180 +
  181 + <!-- Validation inputs -->
  182 + <!--<h4
  183 + class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"
  184 + >
  185 + Validation
  186 + </h4>
  187 + <div
  188 + class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
  189 + >
  190 + <!-- Invalid input -->
  191 + <!--<label class="block text-sm">
  192 + <span class="text-gray-700 dark:text-gray-400">
  193 + Invalid input
  194 + </span>
  195 + <input
  196 + class="block w-full mt-1 text-sm border-red-600 dark:text-gray-300 dark:bg-gray-700 focus:border-red-400 focus:outline-none focus:shadow-outline-red form-input"
  197 + placeholder="Jane Doe"
  198 + />
  199 + <span class="text-xs text-red-600 dark:text-red-400">
  200 + Your password is too short.
  201 + </span>
  202 + </label>
  203 +
  204 + <!-- Valid input -->
  205 + <!--<label class="block mt-4 text-sm">
  206 + <span class="text-gray-700 dark:text-gray-400">
  207 + Valid input
  208 + </span>
  209 + <input
  210 + class="block w-full mt-1 text-sm border-green-600 dark:text-gray-300 dark:bg-gray-700 focus:border-green-400 focus:outline-none focus:shadow-outline-green form-input"
  211 + placeholder="Jane Doe"
  212 + />
  213 + <span class="text-xs text-green-600 dark:text-green-400">
  214 + Your password is strong.
  215 + </span>
  216 + </label>
  217 +
  218 + <!-- Helper text -->
  219 + <!--<label class="block mt-4 text-sm">
  220 + <span class="text-gray-700 dark:text-gray-400">
  221 + Helper text
  222 + </span>
  223 + <input
  224 + class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray form-input"
  225 + placeholder="Jane Doe"
  226 + />
  227 + <span class="text-xs text-gray-600 dark:text-gray-400">
  228 + Your password must be at least 6 characters long.
  229 + </span>
  230 + </label>
  231 + </div>
  232 +
  233 + <!-- Inputs with icons -->
  234 + <!--<h4
  235 + class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"
  236 + >
  237 + Icons
  238 + </h4>
  239 + <div
  240 + class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
  241 + >
  242 + <label class="block text-sm">
  243 + <span class="text-gray-700 dark:text-gray-400">Icon left</span>
  244 + <!-- focus-within sets the color for the icon when input is focused -->
  245 + <!--<div
  246 + class="relative text-gray-500 focus-within:text-purple-600 dark:focus-within:text-purple-400"
  247 + >
  248 + <input
  249 + class="block w-full pl-10 mt-1 text-sm text-black dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray form-input"
  250 + placeholder="Jane Doe"
  251 + />
  252 + <div
  253 + class="absolute inset-y-0 flex items-center ml-3 pointer-events-none"
  254 + >
  255 + <svg
  256 + class="w-5 h-5"
  257 + aria-hidden="true"
  258 + fill="none"
  259 + stroke-linecap="round"
  260 + stroke-linejoin="round"
  261 + stroke-width="2"
  262 + viewBox="0 0 24 24"
  263 + stroke="currentColor"
  264 + >
  265 + <path
  266 + d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"
  267 + ></path>
  268 + </svg>
  269 + </div>
  270 + </div>
  271 + </label>
  272 +
  273 + <label class="block mt-4 text-sm">
  274 + <span class="text-gray-700 dark:text-gray-400">Icon right</span>
  275 + <!-- focus-within sets the color for the icon when input is focused -->
  276 + <!--<div
  277 + class="relative text-gray-500 focus-within:text-purple-600 dark:focus-within:text-purple-400"
  278 + >
  279 + <input
  280 + class="block w-full pr-10 mt-1 text-sm text-black dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray form-input"
  281 + placeholder="Jane Doe"
  282 + />
  283 + <div
  284 + class="absolute inset-y-0 right-0 flex items-center mr-3 pointer-events-none"
  285 + >
  286 + <svg
  287 + class="w-5 h-5"
  288 + aria-hidden="true"
  289 + fill="none"
  290 + stroke-linecap="round"
  291 + stroke-linejoin="round"
  292 + stroke-width="2"
  293 + viewBox="0 0 24 24"
  294 + stroke="currentColor"
  295 + >
  296 + <path
  297 + d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"
  298 + ></path>
  299 + </svg>
  300 + </div>
  301 + </div>
  302 + </label>
  303 + </div>
  304 +
  305 + <!-- Inputs with buttons -->
  306 + <!--<h4
  307 + class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"
  308 + >
  309 + Buttons
  310 + </h4>
  311 + <div
  312 + class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
  313 + >
  314 + <label class="block text-sm">
  315 + <span class="text-gray-700 dark:text-gray-400">
  316 + Button left
  317 + </span>
  318 + <div class="relative">
  319 + <input
  320 + class="block w-full pl-20 mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray form-input"
  321 + placeholder="Jane Doe"
  322 + />
  323 + <button
  324 + class="absolute inset-y-0 px-4 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-l-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray"
  325 + >
  326 + Click
  327 + </button>
  328 + </div>
  329 + </label>
  330 +
  331 + <label class="block mt-4 text-sm">
  332 + <span class="text-gray-700 dark:text-gray-400">
  333 + Button right
  334 + </span>
  335 + <div
  336 + class="relative text-gray-500 focus-within:text-purple-600"
  337 + >
  338 + <input
  339 + class="block w-full pr-20 mt-1 text-sm text-black dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray form-input"
  340 + placeholder="Jane Doe"
  341 + />
  342 + <button
  343 + class="absolute inset-y-0 right-0 px-4 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-r-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"
  344 + >
  345 + Click
  346 + </button>
  347 + </div>
  348 + </label>
  349 + </div>-->
  350 +@endsection
resources/views/layout/admin.blade.php
... ... @@ -816,7 +816,7 @@
816 816 <li class="flex">
817 817 <a
818 818 class="inline-flex items-center w-full px-2 py-1 text-sm font-semibold transition-colors duration-150 rounded-md hover:bg-gray-100 hover:text-gray-800 dark:hover:bg-gray-800 dark:hover:text-gray-200"
819   - href="#"
  819 + href="{{ route('admin.profile') }}"
820 820 >
821 821 <svg
822 822 class="w-4 h-4 mr-3"
... ... @@ -838,7 +838,7 @@
838 838 <li class="flex">
839 839 <a
840 840 class="inline-flex items-center w-full px-2 py-1 text-sm font-semibold transition-colors duration-150 rounded-md hover:bg-gray-100 hover:text-gray-800 dark:hover:bg-gray-800 dark:hover:text-gray-200"
841   - href="#"
  841 + href="{{ route('admin.config') }}"
842 842 >
843 843 <svg
844 844 class="w-4 h-4 mr-3"
... ... @@ -74,6 +74,15 @@ Route::group([
74 74  
75 75 // кабинет главная страница
76 76 Route::get('cabinet', [AdminController::class, 'index'])->name('index');
  77 + // кабинет профиль - форма
  78 + Route::get('profile', [AdminController::class, 'profile'])->name('profile');
  79 + // кабинет профиль - сохранение формы
  80 + Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile');
  81 +
  82 + // кабинет настройки - форма
  83 + Route::get('config', [AdminController::class, 'config_form'])->name('config');
  84 + // кабинет настройки сохранение формы
  85 + Route::post('config', [AdminController::class, 'store_config'])->name('store_config');
77 86  
78 87 // кабинет - пользователи
79 88 Route::get('users', [UsersController::class, 'index'])->name('users');
... ... @@ -0,0 +1,343 @@
  1 +-- --------------------------------------------------------
  2 +-- Хост: 127.0.0.1
  3 +-- Версия сервера: 8.0.24 - MySQL Community Server - GPL
  4 +-- Операционная система: Win64
  5 +-- HeidiSQL Версия: 11.3.0.6295
  6 +-- --------------------------------------------------------
  7 +
  8 +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  9 +/*!40101 SET NAMES utf8 */;
  10 +/*!50503 SET NAMES utf8mb4 */;
  11 +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  12 +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  13 +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  14 +
  15 +
  16 +-- Дамп структуры базы данных laravel_rekamore
  17 +--CREATE DATABASE IF NOT EXISTS `laravel_rekamore` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
  18 +--USE `laravel_rekamore`;
  19 +
  20 +-- Дамп структуры для таблица laravel_rekamore.ad_employers
  21 +CREATE TABLE IF NOT EXISTS `ad_employers` (
  22 + `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  23 + `employer_id` bigint NOT NULL,
  24 + `category_id` int NOT NULL DEFAULT '1',
  25 + `telephone` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  26 + `email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  27 + `salary` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  28 + `text` text COLLATE utf8mb4_unicode_ci,
  29 + `city` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  30 + `sort` int NOT NULL DEFAULT '1',
  31 + `created_at` timestamp NULL DEFAULT NULL,
  32 + `updated_at` timestamp NULL DEFAULT NULL,
  33 + PRIMARY KEY (`id`)
  34 +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  35 +
  36 +-- Дамп данных таблицы laravel_rekamore.ad_employers: ~0 rows (приблизительно)
  37 +/*!40000 ALTER TABLE `ad_employers` DISABLE KEYS */;
  38 +/*!40000 ALTER TABLE `ad_employers` ENABLE KEYS */;
  39 +
  40 +-- Дамп структуры для таблица laravel_rekamore.ad_jobs
  41 +CREATE TABLE IF NOT EXISTS `ad_jobs` (
  42 + `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  43 + `ad_employer_id` bigint NOT NULL,
  44 + `job_title_id` bigint NOT NULL,
  45 + `created_at` timestamp NULL DEFAULT NULL,
  46 + `updated_at` timestamp NULL DEFAULT NULL,
  47 + PRIMARY KEY (`id`)
  48 +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  49 +
  50 +-- Дамп данных таблицы laravel_rekamore.ad_jobs: ~0 rows (приблизительно)
  51 +/*!40000 ALTER TABLE `ad_jobs` DISABLE KEYS */;
  52 +/*!40000 ALTER TABLE `ad_jobs` ENABLE KEYS */;
  53 +
  54 +-- Дамп структуры для таблица laravel_rekamore.categories
  55 +CREATE TABLE IF NOT EXISTS `categories` (
  56 + `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  57 + `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  58 + `created_at` timestamp NULL DEFAULT NULL,
  59 + `updated_at` timestamp NULL DEFAULT NULL,
  60 + PRIMARY KEY (`id`)
  61 +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  62 +
  63 +-- Дамп данных таблицы laravel_rekamore.categories: ~0 rows (приблизительно)
  64 +/*!40000 ALTER TABLE `categories` DISABLE KEYS */;
  65 +/*!40000 ALTER TABLE `categories` ENABLE KEYS */;
  66 +
  67 +-- Дамп структуры для таблица laravel_rekamore.employers
  68 +CREATE TABLE IF NOT EXISTS `employers` (
  69 + `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  70 + `user_id` bigint NOT NULL,
  71 + `name_company` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  72 + `telephone` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  73 + `email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  74 + `logo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  75 + `rate` double(8,2) NOT NULL DEFAULT '0.00',
  76 + `text` text COLLATE utf8mb4_unicode_ci,
  77 + `city` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  78 + `sort` int NOT NULL DEFAULT '1',
  79 + `created_at` timestamp NULL DEFAULT NULL,
  80 + `updated_at` timestamp NULL DEFAULT NULL,
  81 + `address` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  82 + `map` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  83 + `site` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  84 + PRIMARY KEY (`id`)
  85 +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  86 +
  87 +-- Дамп данных таблицы laravel_rekamore.employers: ~0 rows (приблизительно)
  88 +/*!40000 ALTER TABLE `employers` DISABLE KEYS */;
  89 +/*!40000 ALTER TABLE `employers` ENABLE KEYS */;
  90 +
  91 +-- Дамп структуры для таблица laravel_rekamore.failed_jobs
  92 +CREATE TABLE IF NOT EXISTS `failed_jobs` (
  93 + `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  94 + `uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  95 + `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
  96 + `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
  97 + `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  98 + `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  99 + `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  100 + PRIMARY KEY (`id`),
  101 + UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`)
  102 +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  103 +
  104 +-- Дамп данных таблицы laravel_rekamore.failed_jobs: ~0 rows (приблизительно)
  105 +/*!40000 ALTER TABLE `failed_jobs` DISABLE KEYS */;
  106 +/*!40000 ALTER TABLE `failed_jobs` ENABLE KEYS */;
  107 +
  108 +-- Дамп структуры для таблица laravel_rekamore.group_users
  109 +CREATE TABLE IF NOT EXISTS `group_users` (
  110 + `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  111 + `name_group` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  112 + `created_at` timestamp NULL DEFAULT NULL,
  113 + `updated_at` timestamp NULL DEFAULT NULL,
  114 + `user_id` bigint NOT NULL,
  115 + PRIMARY KEY (`id`)
  116 +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  117 +
  118 +-- Дамп данных таблицы laravel_rekamore.group_users: ~0 rows (приблизительно)
  119 +/*!40000 ALTER TABLE `group_users` DISABLE KEYS */;
  120 +/*!40000 ALTER TABLE `group_users` ENABLE KEYS */;
  121 +
  122 +-- Дамп структуры для таблица laravel_rekamore.group_works
  123 +CREATE TABLE IF NOT EXISTS `group_works` (
  124 + `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  125 + `group_user_id` bigint NOT NULL,
  126 + `user_id` bigint NOT NULL,
  127 + `created_at` timestamp NULL DEFAULT NULL,
  128 + `updated_at` timestamp NULL DEFAULT NULL,
  129 + PRIMARY KEY (`id`)
  130 +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  131 +
  132 +-- Дамп данных таблицы laravel_rekamore.group_works: ~0 rows (приблизительно)
  133 +/*!40000 ALTER TABLE `group_works` DISABLE KEYS */;
  134 +/*!40000 ALTER TABLE `group_works` ENABLE KEYS */;
  135 +
  136 +-- Дамп структуры для таблица laravel_rekamore.job_titles
  137 +CREATE TABLE IF NOT EXISTS `job_titles` (
  138 + `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  139 + `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  140 + `created_at` timestamp NULL DEFAULT NULL,
  141 + `updated_at` timestamp NULL DEFAULT NULL,
  142 + PRIMARY KEY (`id`)
  143 +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  144 +
  145 +-- Дамп данных таблицы laravel_rekamore.job_titles: ~0 rows (приблизительно)
  146 +/*!40000 ALTER TABLE `job_titles` DISABLE KEYS */;
  147 +/*!40000 ALTER TABLE `job_titles` ENABLE KEYS */;
  148 +
  149 +-- Дамп структуры для таблица laravel_rekamore.messages
  150 +CREATE TABLE IF NOT EXISTS `messages` (
  151 + `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  152 + `user_id` bigint NOT NULL,
  153 + `to_user_id` bigint NOT NULL,
  154 + `text` text COLLATE utf8mb4_unicode_ci,
  155 + `created_at` timestamp NULL DEFAULT NULL,
  156 + `updated_at` timestamp NULL DEFAULT NULL,
  157 + `title` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  158 + `file` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  159 + PRIMARY KEY (`id`)
  160 +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  161 +
  162 +-- Дамп данных таблицы laravel_rekamore.messages: ~0 rows (приблизительно)
  163 +/*!40000 ALTER TABLE `messages` DISABLE KEYS */;
  164 +/*!40000 ALTER TABLE `messages` ENABLE KEYS */;
  165 +
  166 +-- Дамп структуры для таблица laravel_rekamore.migrations
  167 +CREATE TABLE IF NOT EXISTS `migrations` (
  168 + `id` int unsigned NOT NULL AUTO_INCREMENT,
  169 + `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  170 + `batch` int NOT NULL,
  171 + PRIMARY KEY (`id`)
  172 +) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  173 +
  174 +-- Дамп данных таблицы laravel_rekamore.migrations: ~21 rows (приблизительно)
  175 +/*!40000 ALTER TABLE `migrations` DISABLE KEYS */;
  176 +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
  177 + (1, '2014_10_12_000000_create_users_table', 1),
  178 + (2, '2014_10_12_100000_create_password_resets_table', 1),
  179 + (3, '2019_08_19_000000_create_failed_jobs_table', 1),
  180 + (4, '2019_12_14_000001_create_personal_access_tokens_table', 1),
  181 + (5, '2023_05_15_102620_alter_users_table', 2),
  182 + (6, '2023_05_16_062924_alter_users_table2', 3),
  183 + (7, '2023_05_16_080855_create_workers_table', 3),
  184 + (8, '2023_05_16_080945_create_employers_table', 3),
  185 + (9, '2023_05_16_081048_create_ad_employers_table', 3),
  186 + (10, '2023_05_16_081113_create_categories_table', 3),
  187 + (11, '2023_05_16_081142_create_group_users_table', 3),
  188 + (12, '2023_05_16_081213_create_job_titles_table', 3),
  189 + (13, '2023_05_16_081237_create_messages_table', 3),
  190 + (14, '2023_05_16_081308_create_static_workers_table', 3),
  191 + (15, '2023_05_16_081330_create_static_ads_table', 3),
  192 + (16, '2023_05_16_092746_alter_ad_jobs_table', 4),
  193 + (17, '2023_05_16_092836_alter_group_work_table', 4),
  194 + (18, '2023_05_17_090650_alter_group_users_table', 5),
  195 + (19, '2023_05_17_090749_alter_messages_table', 5),
  196 + (20, '2023_05_17_090923_alter_employers_table', 5),
  197 + (21, '2023_05_17_090944_alter_workers_table', 5),
  198 + (22, '2023_05_17_095512_alter_users_table', 6);
  199 +/*!40000 ALTER TABLE `migrations` ENABLE KEYS */;
  200 +
  201 +-- Дамп структуры для таблица laravel_rekamore.password_resets
  202 +CREATE TABLE IF NOT EXISTS `password_resets` (
  203 + `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  204 + `token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  205 + `created_at` timestamp NULL DEFAULT NULL,
  206 + PRIMARY KEY (`email`)
  207 +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  208 +
  209 +-- Дамп данных таблицы laravel_rekamore.password_resets: ~0 rows (приблизительно)
  210 +/*!40000 ALTER TABLE `password_resets` DISABLE KEYS */;
  211 +/*!40000 ALTER TABLE `password_resets` ENABLE KEYS */;
  212 +
  213 +-- Дамп структуры для таблица laravel_rekamore.personal_access_tokens
  214 +CREATE TABLE IF NOT EXISTS `personal_access_tokens` (
  215 + `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  216 + `tokenable_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  217 + `tokenable_id` bigint unsigned NOT NULL,
  218 + `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  219 + `token` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
  220 + `abilities` text COLLATE utf8mb4_unicode_ci,
  221 + `last_used_at` timestamp NULL DEFAULT NULL,
  222 + `expires_at` timestamp NULL DEFAULT NULL,
  223 + `created_at` timestamp NULL DEFAULT NULL,
  224 + `updated_at` timestamp NULL DEFAULT NULL,
  225 + PRIMARY KEY (`id`),
  226 + UNIQUE KEY `personal_access_tokens_token_unique` (`token`),
  227 + KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`)
  228 +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  229 +
  230 +-- Дамп данных таблицы laravel_rekamore.personal_access_tokens: ~0 rows (приблизительно)
  231 +/*!40000 ALTER TABLE `personal_access_tokens` DISABLE KEYS */;
  232 +/*!40000 ALTER TABLE `personal_access_tokens` ENABLE KEYS */;
  233 +
  234 +-- Дамп структуры для таблица laravel_rekamore.static_ads
  235 +CREATE TABLE IF NOT EXISTS `static_ads` (
  236 + `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  237 + `ad_employer_id` bigint NOT NULL,
  238 + `lookin` int NOT NULL DEFAULT '0',
  239 + `month_year` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  240 + `message` int NOT NULL DEFAULT '0',
  241 + `created_at` timestamp NULL DEFAULT NULL,
  242 + `updated_at` timestamp NULL DEFAULT NULL,
  243 + PRIMARY KEY (`id`)
  244 +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  245 +
  246 +-- Дамп данных таблицы laravel_rekamore.static_ads: ~0 rows (приблизительно)
  247 +/*!40000 ALTER TABLE `static_ads` DISABLE KEYS */;
  248 +/*!40000 ALTER TABLE `static_ads` ENABLE KEYS */;
  249 +
  250 +-- Дамп структуры для таблица laravel_rekamore.static_workers
  251 +CREATE TABLE IF NOT EXISTS `static_workers` (
  252 + `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  253 + `user_id` bigint NOT NULL,
  254 + `lookin` int NOT NULL DEFAULT '0',
  255 + `month_year` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  256 + `message` int NOT NULL DEFAULT '0',
  257 + `created_at` timestamp NULL DEFAULT NULL,
  258 + `updated_at` timestamp NULL DEFAULT NULL,
  259 + PRIMARY KEY (`id`)
  260 +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  261 +
  262 +-- Дамп данных таблицы laravel_rekamore.static_workers: ~0 rows (приблизительно)
  263 +/*!40000 ALTER TABLE `static_workers` DISABLE KEYS */;
  264 +/*!40000 ALTER TABLE `static_workers` ENABLE KEYS */;
  265 +
  266 +-- Дамп структуры для таблица laravel_rekamore.users
  267 +CREATE TABLE IF NOT EXISTS `users` (
  268 + `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  269 + `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  270 + `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  271 + `admin` tinyint(1) NOT NULL DEFAULT '0',
  272 + `email_verified_at` timestamp NULL DEFAULT NULL,
  273 + `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  274 + `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  275 + `created_at` timestamp NULL DEFAULT NULL,
  276 + `updated_at` timestamp NULL DEFAULT NULL,
  277 + `telephone` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  278 + `surname` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  279 + `name_man` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  280 + `surname2` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  281 + `is_worker` tinyint(1) NOT NULL DEFAULT '0',
  282 + `is_lookin` tinyint(1) NOT NULL DEFAULT '1',
  283 + `is_message` tinyint(1) NOT NULL DEFAULT '1',
  284 + `is_public` tinyint(1) NOT NULL DEFAULT '1',
  285 + `is_remove` tinyint(1) NOT NULL DEFAULT '0',
  286 + `is_ban` tinyint(1) NOT NULL DEFAULT '0',
  287 + `is_new` tinyint(1) NOT NULL DEFAULT '1',
  288 + PRIMARY KEY (`id`),
  289 + UNIQUE KEY `users_email_unique` (`email`)
  290 +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  291 +
  292 +-- Дамп данных таблицы laravel_rekamore.users: ~4 rows (приблизительно)
  293 +/*!40000 ALTER TABLE `users` DISABLE KEYS */;
  294 +INSERT INTO `users` (`id`, `name`, `email`, `admin`, `email_verified_at`, `password`, `remember_token`, `created_at`, `updated_at`, `telephone`, `surname`, `name_man`, `surname2`, `is_worker`, `is_lookin`, `is_message`, `is_public`, `is_remove`, `is_ban`, `is_new`) VALUES
  295 + (1, 'Администратор', 'admin@mail.ru', 1, '2023-05-15 14:46:39', '$2y$10$4LrFVBjWy.Tjl2OJIuvfiOppobeQNA42bzJ5c1AJRgv1vm56N0/Yq', 'TqzY4yyIUyLJYRdSzGLqGTxNKL4E1x3EbCF2OLlI6bugbek0wRnYNThSMfUh', '2023-05-15 07:46:26', '2023-05-17 13:44:10', '+79131340942', NULL, 'Андрей', NULL, 0, 1, 1, 1, 0, 0, 0),
  296 + (2, 'integralal', 'integralal@mail.ru', 0, '2023-05-15 20:35:12', '$2y$10$As4bkRP3XXiSZG3rERW4Uee05nD9bO8vABDpakx.xG8tuEuBvK9Qq', '9SuLE4Ig5j20yrJxLd3OcAXZ6AQB8hqbZwLlr6o6E3ld5BuTbwuz92kGK1xW', '2023-05-15 10:16:27', '2023-05-17 13:44:09', NULL, NULL, 'Александр', NULL, 1, 1, 1, 1, 0, 0, 0),
  297 + (3, 'менеджер', 'info@renttorg.ru', 0, NULL, '$2y$10$avhr9OwECSHOtRDCE4Qe/uyq8MelzHKRiRT3NqEm/KApe.JcNSkAK', '5cZRhemIWOPFFQUtB0acF6vFvJVfS9WvSRXxxmTkoFiBiy1Gbv4ZbHQhMQWZ', '2023-05-17 06:45:07', '2023-05-17 13:46:17', NULL, NULL, 'Олег', NULL, 0, 1, 1, 1, 0, 0, 0),
  298 + (4, 'Админ-менеджер', 'Info@vekprom.ru', 1, '2023-05-17 15:34:57', '$2y$10$9l3vgMBMFlqAt4xyY7v9EuWB0EdCOVTd1scM2a3FIcXzpI.JPCVmq', 'lPwraQgpzNn7uXB72f4jhvRkcORzmownmJEjFGfXfNPGoWHX44M9DDUm67YG', '2023-05-17 08:33:37', '2023-05-17 13:43:40', NULL, NULL, 'Наталья', NULL, 0, 1, 1, 1, 0, 0, 0);
  299 +/*!40000 ALTER TABLE `users` ENABLE KEYS */;
  300 +
  301 +-- Дамп структуры для таблица laravel_rekamore.workers
  302 +CREATE TABLE IF NOT EXISTS `workers` (
  303 + `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  304 + `user_id` bigint NOT NULL,
  305 + `status_work` int NOT NULL DEFAULT '1',
  306 + `position_work` int NOT NULL DEFAULT '1',
  307 + `telephone` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  308 + `telephone2` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  309 + `email` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  310 + `persent_anketa` int NOT NULL DEFAULT '10',
  311 + `photo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  312 + `email_data` tinyint(1) NOT NULL DEFAULT '0',
  313 + `status_profile` int NOT NULL DEFAULT '1',
  314 + `old_year` int DEFAULT NULL,
  315 + `experience` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  316 + `en_is` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  317 + `interpassport` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  318 + `mk` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  319 + `vvp` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  320 + `vlm` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  321 + `reka_diplom` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  322 + `more_diplom` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  323 + `mpss` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  324 + `tanker` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  325 + `gmssb` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  326 + `resume` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  327 + `sort` int NOT NULL,
  328 + `created_at` timestamp NULL DEFAULT NULL,
  329 + `updated_at` timestamp NULL DEFAULT NULL,
  330 + `address` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  331 + `city` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  332 + `text` text COLLATE utf8mb4_unicode_ci,
  333 + PRIMARY KEY (`id`)
  334 +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  335 +
  336 +-- Дамп данных таблицы laravel_rekamore.workers: ~0 rows (приблизительно)
  337 +/*!40000 ALTER TABLE `workers` DISABLE KEYS */;
  338 +/*!40000 ALTER TABLE `workers` ENABLE KEYS */;
  339 +
  340 +/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
  341 +/*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */;
  342 +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  343 +/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */;