Commit d69adb313a068ab9d201fca6a7fca747ba20f043

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

Merge branch 'master' of http://gitlab.nologostudio.ru/alarionov/rekamore-su

Showing 30 changed files Side-by-side Diff

app/Http/Controllers/Admin/EducationController.php
... ... @@ -6,6 +6,7 @@ use App\Http\Controllers\Controller;
6 6 use App\Http\Requests\EducationRequest;
7 7 use App\Models\Education;
8 8 use Illuminate\Http\Request;
  9 +use Illuminate\Support\Facades\Storage;
9 10  
10 11 class EducationController extends Controller
11 12 {
... ... @@ -38,7 +39,13 @@ class EducationController extends Controller
38 39 */
39 40 public function store(EducationRequest $request)
40 41 {
41   - Education::create($request->all());
  42 + $params = $request->all();
  43 + if ($request->has('image')) {
  44 + $params['image'] = $request->file('image')->store("education", 'public');
  45 + }
  46 + Education::create($params);
  47 +
  48 +
42 49 return redirect()->route('admin.education.index');
43 50 }
44 51  
... ... @@ -61,6 +68,7 @@ class EducationController extends Controller
61 68 */
62 69 public function edit(Education $education)
63 70 {
  71 +
64 72 return view('admin.education.edit', compact('education'));
65 73 }
66 74  
... ... @@ -73,7 +81,15 @@ class EducationController extends Controller
73 81 */
74 82 public function update(EducationRequest $request, Education $education)
75 83 {
76   - $education->update($request->all());
  84 + $params = $request->all();
  85 + if ($request->has('image')) {
  86 + if (!empty($education->image)) {
  87 + Storage::delete($education->image);
  88 + }
  89 + $params['image'] = $request->file('image')->store("education", 'public');
  90 + }
  91 +
  92 + $education->update($params);
77 93 return redirect()->route('admin.education.index');
78 94 }
79 95  
app/Http/Controllers/Admin/MsgAnswersController.php
... ... @@ -5,6 +5,7 @@ namespace App\Http\Controllers\Admin;
5 5 use App\Http\Controllers\Controller;
6 6 use App\Models\Message;
7 7 use App\Models\User;
  8 +use Illuminate\Database\Eloquent\Builder;
8 9 use Illuminate\Http\Request;
9 10 use Illuminate\Support\Facades\Auth;
10 11 use Illuminate\Support\Facades\DB;
... ... @@ -12,10 +13,88 @@ use Illuminate\Support\Facades\Validator;
12 13  
13 14 class MsgAnswersController extends Controller
14 15 {
15   - public function messages() {
16   - $Msgs = Message::with('user_from')->with('user_to')->with('response')->orderByDesc('created_at')->paginate(25);
  16 + public function messages(Request $request) {
  17 + $find_key = "";
  18 + $find_cat = "";
  19 + $Msgs = Message::with('user_from')->with('user_to')->with('response');
  20 +
  21 + $Msgs = $this->filter($Msgs, $request, $find_key, $find_cat);
  22 +
  23 + $Msgs = $Msgs->orderByDesc('created_at')->paginate(25);
  24 +
  25 + return view('admin.messages', compact('Msgs', 'find_key', 'find_cat'));
  26 + }
  27 +
  28 + public function read_message(Message $message) {
  29 + return view('admin.message-read', compact('message'));
  30 + }
  31 +
  32 + public function filter($Msgs, Request $request, &$find_key, &$find_cat) {
  33 + if (isset($request->find)) {
  34 + $find_key = $request->find;
  35 + $Msgs = $Msgs->where(function($q) use ($find_key) {
  36 + $q->whereHas('user_from',
  37 + function (Builder $query) use ($find_key) {
  38 + $query->where('name', 'LIKE', "%$find_key%");
  39 + }
  40 + )->
  41 + orWhereHas('user_to',
  42 + function (Builder $query) use ($find_key) {
  43 + $query->where('name', 'LIKE', "%$find_key%");
  44 + }
  45 + );
  46 + });
  47 + }
  48 +
  49 + if (isset($request->category)) {
  50 + $find_cat = $request->category;
  51 +
  52 + switch ($find_cat) {
  53 + case 'Работодатели':
  54 + $Msgs = $Msgs->where(function($q) {
  55 + $q->whereHas('user_to',
  56 + function (Builder $query) {
  57 + $query->where('is_worker', '0');
  58 + }
  59 + )->orwhereHas('user_from',
  60 + function (Builder $query) {
  61 + $query->where('is_worker', '0');
  62 + }
  63 + );
  64 + });
  65 + break;
  66 + case 'Соискатели':
  67 + $Msgs = $Msgs->where(function($q) {
  68 + $q->whereHas('user_to',
  69 + function (Builder $query) {
  70 + $query->where('is_worker', '1');
  71 + }
  72 + )->orwhereHas('user_from',
  73 + function (Builder $query) {
  74 + $query->where('is_worker', '1');
  75 + }
  76 + );
  77 + });
  78 + break;
  79 + case 'Администраторы':
  80 + $Msgs = $Msgs->where(function($q) {
  81 + $q->whereHas('user_to',
  82 + function (Builder $query) {
  83 + $query->where('admin', '1');
  84 + }
  85 + )->orwhereHas('user_from',
  86 + function (Builder $query) {
  87 + $query->where('admin', '1');
  88 + }
  89 + );
  90 + });
  91 + break;
  92 + default:break;
  93 + }
  94 + }
  95 +
  96 + return $Msgs;
17 97  
18   - return view('admin.messages', compact('Msgs'));
19 98 }
20 99  
21 100 public function admin_messages(Request $request) {
... ... @@ -29,14 +108,22 @@ class MsgAnswersController extends Controller
29 108 $users = User::query()->OrderBy('name')->get();
30 109  
31 110 $Msgs = Message::with('user_from')->with('user_to')->with('response')
32   - ->where('user_id', '=', $id_admin)
33   - ->orWhere('to_user_id', '=', $id_admin)
34   - ->orderByDesc('created_at')->paginate(5);
  111 + ->where(function($query) use ($id_admin) {
  112 + $query->where('user_id', '=', $id_admin)
  113 + ->orWhere('to_user_id', '=', $id_admin);
  114 + });
  115 +
  116 + $find_key = '';
  117 + $find_cat = '';
  118 +
  119 + $Msgs = $this->filter($Msgs, $request, $find_key, $find_cat);
  120 +
  121 + $Msgs = $Msgs->orderByDesc('created_at')->paginate(5);
35 122  
36 123 if ($request->ajax())
37 124 return view('admin.message.index_ajax', compact('Msgs', 'id_admin', 'users'));
38 125 else
39   - return view('admin.message.index', compact('Msgs', 'id_admin', 'users'));
  126 + return view('admin.message.index', compact('Msgs', 'id_admin', 'users', 'find_key', 'find_cat'));
40 127 }
41 128  
42 129 public function messages_sql(Request $request) {
app/Http/Controllers/PagesController.php
... ... @@ -5,6 +5,8 @@ namespace App\Http\Controllers;
5 5 use App\Models\pages;
6 6 use Illuminate\Http\Request;
7 7 use Illuminate\Support\Facades\Redis;
  8 +use PhpOffice\PhpSpreadsheet\Spreadsheet;
  9 +use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
8 10  
9 11 class PagesController extends Controller
10 12 {
... ... @@ -24,4 +26,13 @@ class PagesController extends Controller
24 26 dd($values);
25 27  
26 28 }
  29 +
  30 + public function excel() {
  31 + $spreadsheet = new Spreadsheet();
  32 + $activeWorksheet = $spreadsheet->getActiveSheet();
  33 + $activeWorksheet->setCellValue('A1', 'Hello World !');
  34 +
  35 + $writer = new Xlsx($spreadsheet);
  36 + $writer->save('hello_world.xlsx');
  37 + }
27 38 }
app/Http/Requests/EducationRequest.php
... ... @@ -25,6 +25,11 @@ class EducationRequest extends FormRequest
25 25 {
26 26 return [
27 27 'name' => 'required|min:3|max:255',
  28 + 'email' => 'required|email|min:5',
  29 + 'image' => [
  30 + 'mimes:jpeg,jpg,png',
  31 + 'max:10000'
  32 + ],
28 33 ];
29 34 }
30 35  
... ... @@ -39,6 +44,7 @@ class EducationRequest extends FormRequest
39 44 'string' => 'Поле «:attribute» должно быть не больше :max символов',
40 45 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
41 46 ],
  47 + 'email' => 'Введите корректный емайл'
42 48  
43 49 ];
44 50 }
app/Models/Education.php
... ... @@ -11,7 +11,12 @@ class Education extends Model
11 11  
12 12 protected $fillable = [
13 13 'name',
14   - 'is_remove'
  14 + 'is_remove',
  15 + 'address',
  16 + 'telephone',
  17 + 'email',
  18 + 'text',
  19 + 'image'
15 20 ];
16 21  
17 22 public function scopeActive($query) {
... ... @@ -14,8 +14,8 @@
14 14 "laravel/framework": "^9.19",
15 15 "laravel/sanctum": "^3.0",
16 16 "laravel/tinker": "^2.7",
17   - "laravel/ui": "^4.2"
18   -
  17 + "laravel/ui": "^4.2",
  18 + "phpoffice/phpspreadsheet": "^1.29"
19 19 },
20 20 "require-dev": {
21 21 "barryvdh/laravel-debugbar": "^3.9",
... ... @@ -4,7 +4,7 @@
4 4 "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5 5 "This file is @generated automatically"
6 6 ],
7   - "content-hash": "20183a94ace5a057147d8f922629489d",
  7 + "content-hash": "e00756e0febf0cc362b59b2f6f9fa84c",
8 8 "packages": [
9 9 {
10 10 "name": "akaunting/laravel-money",
... ... @@ -747,6 +747,67 @@
747 747 "time": "2023-01-02T17:26:14+00:00"
748 748 },
749 749 {
  750 + "name": "ezyang/htmlpurifier",
  751 + "version": "v4.16.0",
  752 + "source": {
  753 + "type": "git",
  754 + "url": "https://github.com/ezyang/htmlpurifier.git",
  755 + "reference": "523407fb06eb9e5f3d59889b3978d5bfe94299c8"
  756 + },
  757 + "dist": {
  758 + "type": "zip",
  759 + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/523407fb06eb9e5f3d59889b3978d5bfe94299c8",
  760 + "reference": "523407fb06eb9e5f3d59889b3978d5bfe94299c8",
  761 + "shasum": ""
  762 + },
  763 + "require": {
  764 + "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0"
  765 + },
  766 + "require-dev": {
  767 + "cerdic/css-tidy": "^1.7 || ^2.0",
  768 + "simpletest/simpletest": "dev-master"
  769 + },
  770 + "suggest": {
  771 + "cerdic/css-tidy": "If you want to use the filter 'Filter.ExtractStyleBlocks'.",
  772 + "ext-bcmath": "Used for unit conversion and imagecrash protection",
  773 + "ext-iconv": "Converts text to and from non-UTF-8 encodings",
  774 + "ext-tidy": "Used for pretty-printing HTML"
  775 + },
  776 + "type": "library",
  777 + "autoload": {
  778 + "files": [
  779 + "library/HTMLPurifier.composer.php"
  780 + ],
  781 + "psr-0": {
  782 + "HTMLPurifier": "library/"
  783 + },
  784 + "exclude-from-classmap": [
  785 + "/library/HTMLPurifier/Language/"
  786 + ]
  787 + },
  788 + "notification-url": "https://packagist.org/downloads/",
  789 + "license": [
  790 + "LGPL-2.1-or-later"
  791 + ],
  792 + "authors": [
  793 + {
  794 + "name": "Edward Z. Yang",
  795 + "email": "admin@htmlpurifier.org",
  796 + "homepage": "http://ezyang.com"
  797 + }
  798 + ],
  799 + "description": "Standards compliant HTML filter written in PHP",
  800 + "homepage": "http://htmlpurifier.org/",
  801 + "keywords": [
  802 + "html"
  803 + ],
  804 + "support": {
  805 + "issues": "https://github.com/ezyang/htmlpurifier/issues",
  806 + "source": "https://github.com/ezyang/htmlpurifier/tree/v4.16.0"
  807 + },
  808 + "time": "2022-09-18T07:06:19+00:00"
  809 + },
  810 + {
750 811 "name": "filament/forms",
751 812 "version": "v2.17.40",
752 813 "source": {
... ... @@ -2570,6 +2631,194 @@
2570 2631 "time": "2023-03-03T20:12:38+00:00"
2571 2632 },
2572 2633 {
  2634 + "name": "maennchen/zipstream-php",
  2635 + "version": "3.1.0",
  2636 + "source": {
  2637 + "type": "git",
  2638 + "url": "https://github.com/maennchen/ZipStream-PHP.git",
  2639 + "reference": "b8174494eda667f7d13876b4a7bfef0f62a7c0d1"
  2640 + },
  2641 + "dist": {
  2642 + "type": "zip",
  2643 + "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/b8174494eda667f7d13876b4a7bfef0f62a7c0d1",
  2644 + "reference": "b8174494eda667f7d13876b4a7bfef0f62a7c0d1",
  2645 + "shasum": ""
  2646 + },
  2647 + "require": {
  2648 + "ext-mbstring": "*",
  2649 + "ext-zlib": "*",
  2650 + "php-64bit": "^8.1"
  2651 + },
  2652 + "require-dev": {
  2653 + "ext-zip": "*",
  2654 + "friendsofphp/php-cs-fixer": "^3.16",
  2655 + "guzzlehttp/guzzle": "^7.5",
  2656 + "mikey179/vfsstream": "^1.6",
  2657 + "php-coveralls/php-coveralls": "^2.5",
  2658 + "phpunit/phpunit": "^10.0",
  2659 + "vimeo/psalm": "^5.0"
  2660 + },
  2661 + "suggest": {
  2662 + "guzzlehttp/psr7": "^2.4",
  2663 + "psr/http-message": "^2.0"
  2664 + },
  2665 + "type": "library",
  2666 + "autoload": {
  2667 + "psr-4": {
  2668 + "ZipStream\\": "src/"
  2669 + }
  2670 + },
  2671 + "notification-url": "https://packagist.org/downloads/",
  2672 + "license": [
  2673 + "MIT"
  2674 + ],
  2675 + "authors": [
  2676 + {
  2677 + "name": "Paul Duncan",
  2678 + "email": "pabs@pablotron.org"
  2679 + },
  2680 + {
  2681 + "name": "Jonatan Männchen",
  2682 + "email": "jonatan@maennchen.ch"
  2683 + },
  2684 + {
  2685 + "name": "Jesse Donat",
  2686 + "email": "donatj@gmail.com"
  2687 + },
  2688 + {
  2689 + "name": "András Kolesár",
  2690 + "email": "kolesar@kolesar.hu"
  2691 + }
  2692 + ],
  2693 + "description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.",
  2694 + "keywords": [
  2695 + "stream",
  2696 + "zip"
  2697 + ],
  2698 + "support": {
  2699 + "issues": "https://github.com/maennchen/ZipStream-PHP/issues",
  2700 + "source": "https://github.com/maennchen/ZipStream-PHP/tree/3.1.0"
  2701 + },
  2702 + "funding": [
  2703 + {
  2704 + "url": "https://github.com/maennchen",
  2705 + "type": "github"
  2706 + },
  2707 + {
  2708 + "url": "https://opencollective.com/zipstream",
  2709 + "type": "open_collective"
  2710 + }
  2711 + ],
  2712 + "time": "2023-06-21T14:59:35+00:00"
  2713 + },
  2714 + {
  2715 + "name": "markbaker/complex",
  2716 + "version": "3.0.2",
  2717 + "source": {
  2718 + "type": "git",
  2719 + "url": "https://github.com/MarkBaker/PHPComplex.git",
  2720 + "reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9"
  2721 + },
  2722 + "dist": {
  2723 + "type": "zip",
  2724 + "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/95c56caa1cf5c766ad6d65b6344b807c1e8405b9",
  2725 + "reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9",
  2726 + "shasum": ""
  2727 + },
  2728 + "require": {
  2729 + "php": "^7.2 || ^8.0"
  2730 + },
  2731 + "require-dev": {
  2732 + "dealerdirect/phpcodesniffer-composer-installer": "dev-master",
  2733 + "phpcompatibility/php-compatibility": "^9.3",
  2734 + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
  2735 + "squizlabs/php_codesniffer": "^3.7"
  2736 + },
  2737 + "type": "library",
  2738 + "autoload": {
  2739 + "psr-4": {
  2740 + "Complex\\": "classes/src/"
  2741 + }
  2742 + },
  2743 + "notification-url": "https://packagist.org/downloads/",
  2744 + "license": [
  2745 + "MIT"
  2746 + ],
  2747 + "authors": [
  2748 + {
  2749 + "name": "Mark Baker",
  2750 + "email": "mark@lange.demon.co.uk"
  2751 + }
  2752 + ],
  2753 + "description": "PHP Class for working with complex numbers",
  2754 + "homepage": "https://github.com/MarkBaker/PHPComplex",
  2755 + "keywords": [
  2756 + "complex",
  2757 + "mathematics"
  2758 + ],
  2759 + "support": {
  2760 + "issues": "https://github.com/MarkBaker/PHPComplex/issues",
  2761 + "source": "https://github.com/MarkBaker/PHPComplex/tree/3.0.2"
  2762 + },
  2763 + "time": "2022-12-06T16:21:08+00:00"
  2764 + },
  2765 + {
  2766 + "name": "markbaker/matrix",
  2767 + "version": "3.0.1",
  2768 + "source": {
  2769 + "type": "git",
  2770 + "url": "https://github.com/MarkBaker/PHPMatrix.git",
  2771 + "reference": "728434227fe21be27ff6d86621a1b13107a2562c"
  2772 + },
  2773 + "dist": {
  2774 + "type": "zip",
  2775 + "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/728434227fe21be27ff6d86621a1b13107a2562c",
  2776 + "reference": "728434227fe21be27ff6d86621a1b13107a2562c",
  2777 + "shasum": ""
  2778 + },
  2779 + "require": {
  2780 + "php": "^7.1 || ^8.0"
  2781 + },
  2782 + "require-dev": {
  2783 + "dealerdirect/phpcodesniffer-composer-installer": "dev-master",
  2784 + "phpcompatibility/php-compatibility": "^9.3",
  2785 + "phpdocumentor/phpdocumentor": "2.*",
  2786 + "phploc/phploc": "^4.0",
  2787 + "phpmd/phpmd": "2.*",
  2788 + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
  2789 + "sebastian/phpcpd": "^4.0",
  2790 + "squizlabs/php_codesniffer": "^3.7"
  2791 + },
  2792 + "type": "library",
  2793 + "autoload": {
  2794 + "psr-4": {
  2795 + "Matrix\\": "classes/src/"
  2796 + }
  2797 + },
  2798 + "notification-url": "https://packagist.org/downloads/",
  2799 + "license": [
  2800 + "MIT"
  2801 + ],
  2802 + "authors": [
  2803 + {
  2804 + "name": "Mark Baker",
  2805 + "email": "mark@demon-angel.eu"
  2806 + }
  2807 + ],
  2808 + "description": "PHP Class for working with matrices",
  2809 + "homepage": "https://github.com/MarkBaker/PHPMatrix",
  2810 + "keywords": [
  2811 + "mathematics",
  2812 + "matrix",
  2813 + "vector"
  2814 + ],
  2815 + "support": {
  2816 + "issues": "https://github.com/MarkBaker/PHPMatrix/issues",
  2817 + "source": "https://github.com/MarkBaker/PHPMatrix/tree/3.0.1"
  2818 + },
  2819 + "time": "2022-12-02T22:17:43+00:00"
  2820 + },
  2821 + {
2573 2822 "name": "masterminds/html5",
2574 2823 "version": "2.8.0",
2575 2824 "source": {
... ... @@ -3132,6 +3381,111 @@
3132 3381 "time": "2023-02-08T01:06:31+00:00"
3133 3382 },
3134 3383 {
  3384 + "name": "phpoffice/phpspreadsheet",
  3385 + "version": "1.29.0",
  3386 + "source": {
  3387 + "type": "git",
  3388 + "url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
  3389 + "reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0"
  3390 + },
  3391 + "dist": {
  3392 + "type": "zip",
  3393 + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/fde2ccf55eaef7e86021ff1acce26479160a0fa0",
  3394 + "reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0",
  3395 + "shasum": ""
  3396 + },
  3397 + "require": {
  3398 + "ext-ctype": "*",
  3399 + "ext-dom": "*",
  3400 + "ext-fileinfo": "*",
  3401 + "ext-gd": "*",
  3402 + "ext-iconv": "*",
  3403 + "ext-libxml": "*",
  3404 + "ext-mbstring": "*",
  3405 + "ext-simplexml": "*",
  3406 + "ext-xml": "*",
  3407 + "ext-xmlreader": "*",
  3408 + "ext-xmlwriter": "*",
  3409 + "ext-zip": "*",
  3410 + "ext-zlib": "*",
  3411 + "ezyang/htmlpurifier": "^4.15",
  3412 + "maennchen/zipstream-php": "^2.1 || ^3.0",
  3413 + "markbaker/complex": "^3.0",
  3414 + "markbaker/matrix": "^3.0",
  3415 + "php": "^7.4 || ^8.0",
  3416 + "psr/http-client": "^1.0",
  3417 + "psr/http-factory": "^1.0",
  3418 + "psr/simple-cache": "^1.0 || ^2.0 || ^3.0"
  3419 + },
  3420 + "require-dev": {
  3421 + "dealerdirect/phpcodesniffer-composer-installer": "dev-main",
  3422 + "dompdf/dompdf": "^1.0 || ^2.0",
  3423 + "friendsofphp/php-cs-fixer": "^3.2",
  3424 + "mitoteam/jpgraph": "^10.3",
  3425 + "mpdf/mpdf": "^8.1.1",
  3426 + "phpcompatibility/php-compatibility": "^9.3",
  3427 + "phpstan/phpstan": "^1.1",
  3428 + "phpstan/phpstan-phpunit": "^1.0",
  3429 + "phpunit/phpunit": "^8.5 || ^9.0 || ^10.0",
  3430 + "squizlabs/php_codesniffer": "^3.7",
  3431 + "tecnickcom/tcpdf": "^6.5"
  3432 + },
  3433 + "suggest": {
  3434 + "dompdf/dompdf": "Option for rendering PDF with PDF Writer",
  3435 + "ext-intl": "PHP Internationalization Functions",
  3436 + "mitoteam/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers",
  3437 + "mpdf/mpdf": "Option for rendering PDF with PDF Writer",
  3438 + "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer"
  3439 + },
  3440 + "type": "library",
  3441 + "autoload": {
  3442 + "psr-4": {
  3443 + "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet"
  3444 + }
  3445 + },
  3446 + "notification-url": "https://packagist.org/downloads/",
  3447 + "license": [
  3448 + "MIT"
  3449 + ],
  3450 + "authors": [
  3451 + {
  3452 + "name": "Maarten Balliauw",
  3453 + "homepage": "https://blog.maartenballiauw.be"
  3454 + },
  3455 + {
  3456 + "name": "Mark Baker",
  3457 + "homepage": "https://markbakeruk.net"
  3458 + },
  3459 + {
  3460 + "name": "Franck Lefevre",
  3461 + "homepage": "https://rootslabs.net"
  3462 + },
  3463 + {
  3464 + "name": "Erik Tilt"
  3465 + },
  3466 + {
  3467 + "name": "Adrien Crivelli"
  3468 + }
  3469 + ],
  3470 + "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine",
  3471 + "homepage": "https://github.com/PHPOffice/PhpSpreadsheet",
  3472 + "keywords": [
  3473 + "OpenXML",
  3474 + "excel",
  3475 + "gnumeric",
  3476 + "ods",
  3477 + "php",
  3478 + "spreadsheet",
  3479 + "xls",
  3480 + "xlsx"
  3481 + ],
  3482 + "support": {
  3483 + "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues",
  3484 + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.29.0"
  3485 + },
  3486 + "time": "2023-06-14T22:48:31+00:00"
  3487 + },
  3488 + {
3135 3489 "name": "phpoption/phpoption",
3136 3490 "version": "1.9.1",
3137 3491 "source": {
database/migrations/2023_10_10_094144_alter_table_education.php
... ... @@ -0,0 +1,40 @@
  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::table('education', function (Blueprint $table) {
  17 + $table->string('address', 255)->nullable();
  18 + $table->string('telephone', 255)->nullable();
  19 + $table->string('email', 255)->nullable();
  20 + $table->text('text')->nullable();
  21 + $table->string('image', 255)->nullable();
  22 + });
  23 + }
  24 +
  25 + /**
  26 + * Reverse the migrations.
  27 + *
  28 + * @return void
  29 + */
  30 + public function down()
  31 + {
  32 + Schema::table('education', function (Blueprint $table) {
  33 + $table->dropColumn('address');
  34 + $table->dropColumn('telephone');
  35 + $table->dropColumn('email');
  36 + $table->dropColumn('text');
  37 + $table->dropColumn('image');
  38 + });
  39 + }
  40 +};
html/public/modals.html
... ... @@ -872,17 +872,43 @@
872 872 </div>
873 873  
874 874 <div>
875   - <button
876   - @click="openModal"
877   - class="px-4 py-2 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-lg active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"
  875 + <button id="i1"
  876 + @click="openModal" data-employer="1" data-user="20"
  877 + class="btn px-4 py-2 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-lg active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"
  878 + >
  879 + Open Modal1
  880 + </button>
  881 + <button id="i2"
  882 + @click="openModal" data-employer="2" data-user="25"
  883 + class="btn px-4 py-2 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-lg active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"
  884 + >
  885 + Open Modal2
  886 + </button>
  887 + <button id="i3"
  888 + @click="openModal" data-employer="3" data-user="30"
  889 + class="btn px-4 py-2 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-lg active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"
878 890 >
879   - Open Modal
  891 + Open Modal3
880 892 </button>
881 893 </div>
882 894 </div>
883 895 </main>
884 896 </div>
885 897 </div>
  898 + <script>
  899 + const btns = document.querySelectorAll('.btn');
  900 + btns.forEach(btn => {
  901 + btn.addEventListener('click', (e) => {
  902 + const id = e.target.id;
  903 + let form = document.getElementById("form1");
  904 + form.action = "https://link.ru/"+e.target.getAttribute('data-employer')+'/'+e.target.getAttribute('data-user');
  905 + //document.getElementById("title_modal").innerHTML = id;
  906 + console.log(e.target.getAttribute('data-employer'));
  907 + console.log(e.target.getAttribute('data-user'));
  908 + console.log(id);
  909 + });
  910 + });
  911 + </script>
886 912 <!-- Modal backdrop. This what you want to place close to the closing body tag -->
887 913 <div
888 914 x-show="isModalOpen"
... ... @@ -934,7 +960,7 @@
934 960 <!-- Modal body -->
935 961 <div class="mt-4 mb-6">
936 962 <!-- Modal title -->
937   - <p
  963 + <p name="title_modal" id="title_modal"
938 964 class="mb-2 text-lg font-semibold text-gray-700 dark:text-gray-300"
939 965 >
940 966 Modal header
... ... @@ -954,11 +980,13 @@
954 980 >
955 981 Cancel
956 982 </button>
  983 + <form id="form1" name="form1" action="" method="POST">
957 984 <button
958 985 class="w-full px-5 py-3 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-lg sm:w-auto sm:px-4 sm:py-2 active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"
959 986 >
960 987 Accept
961 988 </button>
  989 + </form>
962 990 </footer>
963 991 </div>
964 992 </div>
public/hello_world.xlsx
No preview for this file type
resources/views/admin/ad_employers/index.blade.php
... ... @@ -87,10 +87,10 @@
87 87 {{ $ad->status }}
88 88 </td>
89 89 <td class="px-4 py-3 text-sm">
90   - {{ $ad->created_at }}
  90 + {{ date('d.m.Y', strtotime($ad->created_at)) }}
91 91 </td>
92 92 <td class="px-4 py-3 text-sm">
93   - {{ $ad->updated_at }}
  93 + {{ date('d.m.Y', strtotime($ad->updated_at)) }}
94 94 </td>
95 95 <td class="px-4 py-3 text-sm">
96 96 <a href="{{ route('admin.edit-ad-employers', ['ad_employer' => $ad->id]) }}">
resources/views/admin/education/add.blade.php
1 1 @extends('layout.admin', ['title' => 'Админка - Добавление образования'])
2 2  
3 3 @section('content')
4   - <form method="POST" action="{{ route('admin.education.store') }}">
  4 + <form method="POST" action="{{ route('admin.education.store') }}" enctype="multipart/form-data">
5 5 @include('admin.education.form')
6 6 </form>
7 7 @endsection
resources/views/admin/education/edit.blade.php
1 1 @extends('layout.admin', ['title' => 'Админка - Редактирование образования'])
2 2  
3 3 @section('content')
4   - <form method="POST" action="{{ route('admin.education.update', ['education' => $education->id]) }}">
  4 + <form method="POST" action="{{ route('admin.education.update', ['education' => $education->id]) }}" enctype="multipart/form-data">
5 5 @include('admin.education.form')
6 6 </form>
7 7 @endsection
resources/views/admin/education/form.blade.php
... ... @@ -6,10 +6,10 @@
6 6  
7 7 <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800">
8 8 <label class="block text-sm">
9   - <span class="text-gray-700 dark:text-gray-400">Имя категории</span>
  9 + <span class="text-gray-700 dark:text-gray-400">Название учебного заведения</span>
10 10 <input name="name" id="name"
11 11 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"
12   - placeholder="Имя категории" value="{{ old('name') ?? $education->name ?? '' }}"
  12 + placeholder="Название учебного заведения" value="{{ old('name') ?? $education->name ?? '' }}"
13 13 />
14 14 @error('name')
15 15 <span class="text-xs text-red-600 dark:text-red-400">
... ... @@ -18,6 +18,72 @@
18 18 @enderror
19 19 </label><br>
20 20  
  21 + <label class="block text-sm">
  22 + <span class="text-gray-700 dark:text-gray-400">Адрес</span>
  23 + <input name="address" id="address"
  24 + 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"
  25 + placeholder="Адрес" value="{{ old('address') ?? $education->address ?? '' }}"
  26 + />
  27 + @error('address')
  28 + <span class="text-xs text-red-600 dark:text-red-400">
  29 + {{ $message }}
  30 + </span>
  31 + @enderror
  32 + </label><br>
  33 +
  34 + <label class="block text-sm">
  35 + <span class="text-gray-700 dark:text-gray-400">Email</span>
  36 + <input name="email" id="email"
  37 + 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"
  38 + placeholder="Email" value="{{ old('email') ?? $education->email ?? '' }}"
  39 + />
  40 + @error('email')
  41 + <span class="text-xs text-red-600 dark:text-red-400">
  42 + {{ $message }}
  43 + </span>
  44 + @enderror
  45 + </label><br>
  46 +
  47 + <label class="block text-sm">
  48 + <span class="text-gray-700 dark:text-gray-400">Телефон</span>
  49 + <input name="telephone" id="telephone"
  50 + 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"
  51 + placeholder="Телефон" value="{{ old('telephone') ?? $education->telephone ?? '' }}"
  52 + />
  53 + @error('telephone')
  54 + <span class="text-xs text-red-600 dark:text-red-400">
  55 + {{ $message }}
  56 + </span>
  57 + @enderror
  58 + </label><br>
  59 +
  60 + <label class="block text-sm">
  61 + <span class="text-gray-700 dark:text-gray-400">Текст</span>
  62 + <textarea class="form-control ckeditor" name="text" placeholder="Текст (html)" required
  63 + rows="10">{{ old('text') ?? $education->text ?? '' }}</textarea>
  64 + @error('text')
  65 + <span class="text-xs text-red-600 dark:text-red-400">
  66 + {{ $message }}
  67 + </span>
  68 + @enderror
  69 + </label><br>
  70 +
  71 + <label class="block text-sm">
  72 + <span class="text-gray-700 dark:text-gray-400">Картинка</span>
  73 + <input type="file" class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700
  74 + focus:border-purple-400 focus:outline-none focus:shadow-outline-purple
  75 + dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
  76 + id="image" name="image" accept="image/png, image/jpeg">
  77 + @error('image')
  78 + <span class="text-xs text-red-600 dark:text-red-400">
  79 + {{ $message }}
  80 + </span>
  81 + @enderror
  82 + @isset($education->image)
  83 + <img src="{{asset(Storage::url($education->image))}}" width="100px"/>
  84 + @endisset
  85 + </label><br>
  86 +
21 87 <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4">
22 88 <div>
23 89 <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">
... ... @@ -30,3 +96,11 @@
30 96 </div>
31 97 </div>
32 98 </div>
  99 +<script src="//cdn.ckeditor.com/4.14.0/standard/ckeditor.js"></script>
  100 +<script>
  101 + CKEDITOR.replace( 'text', {
  102 + filebrowserUploadUrl: "{{route('ckeditor.image-upload', ['_token' => csrf_token() ])}}",
  103 + filebrowserImageUploadUrl: "{{ route('ckeditor.image-upload', ['_token' => csrf_token() ])}}",
  104 + filebrowserUploadMethod: 'form'
  105 + });
  106 +</script>
resources/views/admin/education/index.blade.php
... ... @@ -24,8 +24,8 @@
24 24 >
25 25 <th class="px-4 py-3">№</th>
26 26 <th class="px-4 py-3">Название образования</th>
27   - <th class="px-4 py-3">Дата создания</th>
28 27 <th class="px-4 py-3">Редактировать</th>
  28 + <th class="px-4 py-3">Дата создания</th>
29 29 </tr>
30 30 </thead>
31 31 <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800">
... ... @@ -37,9 +37,7 @@
37 37 <td class="px-4 py-3">
38 38 {{$cat->name}}
39 39 </td>
40   - <td class="px-4 py-3">
41   - {{$cat->created_at}}
42   - </td>
  40 +
43 41 <td class="px-4 py-3 text-sm_">
44 42 <form action="{{ route('admin.education.destroy', ['education' => $cat->id]) }}" method="POST">
45 43 <a href="{{ route('admin.education.edit', ['education' => $cat->id]) }}">Изменить</a> |
... ... @@ -48,6 +46,9 @@
48 46 <input class="btn btn-danger" type="submit" value="Удалить"/>
49 47 </form>
50 48 </td>
  49 + <td class="px-4 py-3">
  50 + {{ date('d.m.Y', strtotime($cat->created_at))}}
  51 + </td>
51 52 </tr>
52 53 @endforeach
53 54 </tbody>
resources/views/admin/employer/index.blade.php
... ... @@ -36,12 +36,31 @@
36 36  
37 37 });
38 38 </script>
  39 + <script>
  40 + const btns = document.querySelectorAll('.btn_del');
  41 + btns.forEach(btn => {
  42 + btn.addEventListener('click', (e) => {
  43 + console.log('click button');
  44 + const id = e.target.id;
  45 + let form = document.getElementById("form_modal_del");
  46 + form.action = "<?=$_SERVER['HTTP_REFERER']?>/delete/"+e.target.getAttribute('data-employer')+'/'+e.target.getAttribute('data-user');
  47 + //document.getElementById("title_modal").innerHTML = id;
  48 + console.log(e.target.getAttribute('data-employer'));
  49 + console.log(e.target.getAttribute('data-user'));
  50 +
  51 + });
  52 + });
  53 + </script>
39 54 @endsection
40 55  
41 56 @section('search')
42 57 @include('admin.find_employer', ['select_category' => $select_category])
43 58 @endsection
44 59  
  60 +@section('modal')
  61 + @include('admin.employer.modal')
  62 +@endsection
  63 +
45 64 @section('content')
46 65 <div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-4">
47 66  
... ... @@ -62,7 +81,9 @@
62 81 </div>
63 82 </div>
64 83 </div>
65   -
  84 + <pre>
  85 + <?//print_r($_SERVER);?>
  86 + </pre>
66 87  
67 88 <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block">
68 89 <div class="w-full overflow-x-auto">
... ... @@ -110,19 +131,19 @@
110 131 {{ $user->category }}
111 132 </td>
112 133 <td class="px-4 py-3 text-sm">
113   - {{ $user->comment_admin }}
  134 + @if (!empty($user->comment_admin))
  135 + Есть
  136 + @else
  137 + Нет
  138 + @endif
114 139 </td>
115 140 <td class="px-4 py-3 text-sm">
116   - {{ $user->created_at }}
  141 + {{ date('d.m.Y', strtotime($user->created_at)) }}
117 142 </td>
118 143 <td class="px-4 py-3 text-sm">
119 144 @if (!empty($user->emp_id))
120   - <form action="{{ route('admin.delete-employer', ['employer' => $user->emp_id, 'user' => $user->user_id]) }}" method="POST">
121 145 <a href="{{ route('admin.employer-profile', ['employer' => $user->emp_id]) }}">Изменить</a> |
122   - @csrf
123   - @method('DELETE')
124   - <input class="btn btn-danger" type="submit" value="Удалить"/>
125   - </form>
  146 + <a @click="openModal" style="cursor: pointer;" data-employer="{{$user->emp_id}}" data-user="{{$user->user_id}}" class="btn_del btn btn-danger">Удалить</a>
126 147 @endif
127 148 </td>
128 149 <!--<td class="px-4 py-3 text-sm">
resources/views/admin/employer/index_ajax.blade.php
... ... @@ -7,10 +7,10 @@
7 7 <th class="px-4 py-3">№</th>
8 8 <th class="px-4 py-3">Название компании</th>
9 9 <th class="px-4 py-3">Email/Телефон</th>
10   - <th class="px-4 py-3">Имя</th>
  10 + <th class="px-4 py-3">Категория</th>
  11 + <th class="px-4 py-3">Комментарий</th>
11 12 <th class="px-4 py-3">Дата регистрации</th>
12   - <th class="px-4 py-3">Изменить</th>
13   - <th class="px-4 py-3">Бан</th>
  13 + <th class="px-4 py-3">Редакт.</th>
14 14 </tr>
15 15 </thead>
16 16 <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800">
... ... @@ -43,18 +43,19 @@
43 43 {{ $user->name_man }} ({{ $user->usr_id }})
44 44 </td>
45 45 <td class="px-4 py-3 text-sm">
46   - {{ $user->created_at }}
  46 + {{ date('d.m.Y', strtotime($user->created_at)) }}
47 47 </td>
48 48 <td class="px-4 py-3 text-sm">
49 49 @if (!empty($user->emp_id))
50   - <a href="{{ route('admin.employer-profile', ['employer' => $user->emp_id]) }}">Изменить</a>
  50 + <a href="{{ route('admin.employer-profile', ['employer' => $user->emp_id]) }}">Изменить</a> |
  51 + <a @click="openModal" style="cursor: pointer;" data-employer="{{$user->emp_id}}" data-user="{{$user->user_id}}" class="btn_del btn btn-danger">Удалить</a>
51 52 @endif
52 53 </td>
53   - <td class="px-4 py-3 text-sm">
  54 + <!--<td class="px-4 py-3 text-sm">
54 55 @if ($user->usr_id > 1)
55 56 <input type="checkbox" class="checkban" value="{{$user->usr_id}}" name="ban_{{$user->usr_id}}" {{ ($user->is_ban) ? "checked" : "" }}/>
56 57 @endif
57   - </td>
  58 + </td>-->
58 59 </tr>
59 60 @endforeach
60 61 </tbody>
resources/views/admin/employer/modal.blade.php
... ... @@ -0,0 +1,87 @@
  1 +<!-- Modal backdrop. This what you want to place close to the closing body tag -->
  2 +<div
  3 + x-show="isModalOpen"
  4 + x-transition:enter="transition ease-out duration-150"
  5 + x-transition:enter-start="opacity-0"
  6 + x-transition:enter-end="opacity-100"
  7 + x-transition:leave="transition ease-in duration-150"
  8 + x-transition:leave-start="opacity-100"
  9 + x-transition:leave-end="opacity-0"
  10 + class="fixed inset-0 z-30 flex items-end bg-black bg-opacity-50 sm:items-center sm:justify-center"
  11 +>
  12 + <!-- Modal -->
  13 + <div
  14 + x-show="isModalOpen"
  15 + x-transition:enter="transition ease-out duration-150"
  16 + x-transition:enter-start="opacity-0 transform translate-y-1/2"
  17 + x-transition:enter-end="opacity-100"
  18 + x-transition:leave="transition ease-in duration-150"
  19 + x-transition:leave-start="opacity-100"
  20 + x-transition:leave-end="opacity-0 transform translate-y-1/2"
  21 + @click.away="closeModal"
  22 + @keydown.escape="closeModal"
  23 + class="w-full px-6 py-4 overflow-hidden bg-white rounded-t-lg dark:bg-gray-800 sm:rounded-lg sm:m-4 sm:max-w-xl"
  24 + role="dialog"
  25 + id="modal"
  26 + >
  27 + <!-- Remove header if you don't want a close icon. Use modal body to place modal tile. -->
  28 + <header class="flex justify-end">
  29 + <button
  30 + class="inline-flex items-center justify-center w-6 h-6 text-gray-400 transition-colors duration-150 rounded dark:hover:text-gray-200 hover: hover:text-gray-700"
  31 + aria-label="close"
  32 + @click="closeModal"
  33 + >
  34 + <svg
  35 + class="w-4 h-4"
  36 + fill="currentColor"
  37 + viewBox="0 0 20 20"
  38 + role="img"
  39 + aria-hidden="true"
  40 + >
  41 + <path
  42 + d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
  43 + clip-rule="evenodd"
  44 + fill-rule="evenodd"
  45 + ></path>
  46 + </svg>
  47 + </button>
  48 + </header>
  49 + <!-- Modal body -->
  50 + <div class="mt-4 mb-6">
  51 + <!-- Modal title -->
  52 + <p
  53 + class="mb-2 text-lg font-semibold text-gray-700 dark:text-gray-300"
  54 + >
  55 + Вы действительно хотите удалить данного работодателя?
  56 + </p>
  57 + <!-- Modal description -->
  58 + <p class="text-sm text-gray-700 dark:text-gray-400">
  59 + Это приведет к удалению всей информации о работодателе<br>
  60 + и его вакансиях на данном проекте.
  61 + </p>
  62 + </div>
  63 + <footer
  64 + class="flex flex-col items-center justify-end px-6 py-3 -mx-6 -mb-4 space-y-4 sm:space-y-0 sm:space-x-6 sm:flex-row bg-gray-50 dark:bg-gray-800"
  65 + >
  66 + <button
  67 + @click="closeModal"
  68 + class="w-full px-5 py-3 text-sm font-medium leading-5 text-white text-gray-700 transition-colors duration-150 border border-gray-300 rounded-lg dark:text-gray-400 sm:px-4 sm:py-2 sm:w-auto active:bg-transparent hover:border-gray-500 focus:border-gray-500 active:text-gray-500 focus:outline-none focus:shadow-outline-gray"
  69 + >
  70 + Отмена
  71 + </button>
  72 + <form id="form_modal_del" name="form_modal_del" action="/employer-profile/delete/{employer}/{user}" method="POST">
  73 + @csrf
  74 + @method('DELETE')
  75 +
  76 + <button
  77 + type="submit"
  78 + class="w-full px-5 py-3 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-lg sm:w-auto sm:px-4 sm:py-2 active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"
  79 + >
  80 + Удалить
  81 + </button>
  82 + </form>
  83 +
  84 + </footer>
  85 + </div>
  86 +</div>
  87 +<!-- End of modal backdrop -->
resources/views/admin/find_message.blade.php
... ... @@ -0,0 +1,41 @@
  1 +<div class="absolute inset-y-0 flex items-center pl-2">
  2 + <svg
  3 + class="w-4 h-4"
  4 + aria-hidden="true"
  5 + fill="currentColor"
  6 + viewBox="0 0 20 20"
  7 + >
  8 + <path
  9 + fill-rule="evenodd"
  10 + d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z"
  11 + clip-rule="evenodd"
  12 + ></path>
  13 + </svg>
  14 +</div>
  15 +<form action="" method="GET">
  16 + <div style="float:left; margin-right:10px"><input
  17 + name="find" id="find"
  18 + class="w-full pl-8 pr-2 text-sm text-gray-700 placeholder-gray-600 bg-gray-100 border-0 rounded-md dark:placeholder-gray-500 dark:focus:shadow-outline-gray dark:focus:placeholder-gray-600 dark:bg-gray-700 dark:text-gray-200 focus:placeholder-gray-500 focus:bg-white focus:border-purple-300 focus:outline-none focus:shadow-outline-purple form-input"
  19 + style="width: 300px"
  20 + type="text"
  21 + placeholder="Искать..."
  22 + aria-label="Search"
  23 + value="{{$find_key}}"
  24 + />
  25 + </div>
  26 + <div style="float:left; margin-top: -5px;">
  27 + <select
  28 + name="category" id="category"
  29 + placeholder="Категории"
  30 + 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"
  31 + >
  32 + <option value="Все категории">Все категории</option>
  33 + <option value="Работодатели" @if ($find_cat =="Работодатели") selected @endif>Работодатели</option>
  34 + <option value="Соискатели" @if ($find_cat =="Соискатели") selected @endif>Соискатели</option>
  35 + <option value="Администраторы" @if ($find_cat =="Администраторы") selected @endif>Администраторы</option>
  36 + </select>
  37 + </div>
  38 + <div style="float: left">
  39 + <button type="submit" class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple">Искать</button>
  40 + </div>
  41 +</form>
resources/views/admin/message-read.blade.php
... ... @@ -0,0 +1,55 @@
  1 +@extends('layout.admin', ['title' => 'Админка - Чтение чужого сообщения'])
  2 +
  3 +@section('script')
  4 +@endsection
  5 +
  6 +@section('search')
  7 +@endsection
  8 +
  9 +@section('content')
  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="name1" id="name1" disabled
  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="@php echo (isset($message->user_from->name)) ? $message->user_from->name.' ('.$message->user_from->id.')' : 'Не определен'; @endphp"
  16 + />
  17 + </label><br>
  18 +
  19 + <label class="block text-sm">
  20 + <span class="text-gray-700 dark:text-gray-400">Получатель</span>
  21 + <input name="name2" id="name2" disabled
  22 + 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"
  23 + placeholder="Название пункта" value="@php echo (isset($message->user_to->name)) ? $message->user_to->name.' ('.$message->user_to->id.')' : 'Не определен'; @endphp"
  24 + />
  25 + </label><br>
  26 +
  27 + <label class="block text-sm">
  28 + <span class="text-gray-700 dark:text-gray-400">Текст</span>
  29 + <textarea name="text" id="text" disabled
  30 + 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"
  31 + placeholder="Текст">{{ $message->text }}</textarea>
  32 + </label><br>
  33 +
  34 + <label class="block text-sm">
  35 + <span class="text-gray-700 dark:text-gray-400">Дата отправки</span>
  36 + <input name="created_at" id="created_at" disabled
  37 + 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"
  38 + placeholder="Дата отправки" value="{{ $message->created_at }}"
  39 + />
  40 + </label><br>
  41 +
  42 + <label class="block text-sm">
  43 + <span class="text-gray-700 dark:text-gray-400">Дата изменения</span>
  44 + <input name="updated_at" id="updated_at" disabled
  45 + 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"
  46 + placeholder="Дата редактирования" value="{{ $message->updated_at }}"
  47 + />
  48 + </label><br>
  49 +
  50 + <a href="{{ route('admin.messages') }}"
  51 + 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"
  52 + style="display: -webkit-inline-box; height: 30px!important;"
  53 + >Назад</a>
  54 +</div>
  55 +@endsection
resources/views/admin/message/index.blade.php
... ... @@ -39,7 +39,7 @@
39 39 @endsection
40 40  
41 41 @section('search')
42   -
  42 + @include('admin.find_message')
43 43 @endsection
44 44  
45 45 @section('content')
... ... @@ -90,7 +90,7 @@
90 90 </div>
91 91 </td>
92 92 <td class="px-4 py-3 text-sm">
93   - {{ $msg->created_at }}
  93 + {{ date('d.m.Y h:i:s', strtotime($msg->created_at)) }}
94 94 </td>
95 95 <td class="px-4 py-3 text-sm">
96 96 @if (isset($msg->user_to->id))
resources/views/admin/message/index_ajax.blade.php
... ... @@ -43,7 +43,7 @@
43 43 </div>
44 44 </td>
45 45 <td class="px-4 py-3 text-sm">
46   - {{ $msg->created_at }}
  46 + {{ date('d.m.Y h:i:s', strtotime($msg->created_at)) }}
47 47 </td>
48 48 <td class="px-4 py-3 text-sm">
49 49 @if (isset($msg->user_to->id))
resources/views/admin/messages.blade.php
... ... @@ -4,32 +4,7 @@
4 4 @endsection
5 5  
6 6 @section('search')
7   - <!--<div class="absolute inset-y-0 flex items-center pl-2">
8   - <svg
9   - class="w-4 h-4"
10   - aria-hidden="true"
11   - fill="currentColor"
12   - viewBox="0 0 20 20"
13   - >
14   - <path
15   - fill-rule="evenodd"
16   - d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z"
17   - clip-rule="evenodd"
18   - ></path>
19   - </svg>
20   - </div>
21   - <form action="" method="POST">
22   - <div style="float:left;"><input
23   - class="w-full pl-8 pr-2 text-sm text-gray-700 placeholder-gray-600 bg-gray-100 border-0 rounded-md dark:placeholder-gray-500 dark:focus:shadow-outline-gray dark:focus:placeholder-gray-600 dark:bg-gray-700 dark:text-gray-200 focus:placeholder-gray-500 focus:bg-white focus:border-purple-300 focus:outline-none focus:shadow-outline-purple form-input"
24   - style="width: 400px"
25   - type="text"
26   - placeholder="Искать компанию или вакансию"
27   - aria-label="Search"
28   - /></div>
29   - <div style="float: left">
30   - <button type="submit" class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple">Поиск</button>
31   - </div>
32   - </form>-->
  7 + @include('admin.find_message')
33 8 @endsection
34 9  
35 10 @section('content')
... ... @@ -43,8 +18,8 @@
43 18 <th class="px-4 py-3">№</th>
44 19 <th class="px-4 py-3">От юзера</th>
45 20 <th class="px-4 py-3">К юзеру</th>
46   - <th class="px-4 py-3">Заголовок</th>
47 21 <th class="px-4 py-3">Отклик</th>
  22 + <th class="px-4 py-3">Читать</th>
48 23 <th class="px-4 py-3">Дата</th>
49 24 </tr>
50 25 </thead>
... ... @@ -69,9 +44,6 @@
69 44 @endif
70 45 </td>
71 46 <td class="px-4 py-3">
72   - {{$msg->title}}
73   - </td>
74   - <td class="px-4 py-3">
75 47 <div class="flex items-center text-sm">
76 48 <div>
77 49 @if ($msg->response->count())
... ... @@ -83,6 +55,9 @@
83 55 </div>
84 56 </td>
85 57 <td class="px-4 py-3 text-sm">
  58 + <a style="text-decoration: underline;" href="{{ route('admin.read-message', ['message' => $msg->id]) }}">Читать</a>
  59 + </td>
  60 + <td class="px-4 py-3 text-sm">
86 61 {{ $msg->created_at }}
87 62 </td>
88 63 </tr>
resources/views/admin/users/index.blade.php
... ... @@ -126,7 +126,7 @@
126 126 @endif
127 127  
128 128 <td class="px-4 py-3 text-sm">
129   - {{ $user->created_at }}
  129 + {{ date('d.m.Y', strtotime($user->created_at)) }}
130 130 </td>
131 131 </tr>
132 132 @endforeach
resources/views/admin/users/index_ajax.blade.php
... ... @@ -60,7 +60,7 @@
60 60 @endif
61 61  
62 62 <td class="px-4 py-3 text-sm">
63   - {{ $user->created_at }}
  63 + {{ date('d.m.Y', strtotime($user->created_at)) }}
64 64 </td>
65 65 </tr>
66 66 @endforeach
resources/views/admin/users/profile.blade.php
... ... @@ -86,7 +86,6 @@
86 86 </label><br>
87 87  
88 88  
89   -
90 89 <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4">
91 90 <div>
92 91 <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">
resources/views/admin/worker/index.blade.php
... ... @@ -108,7 +108,7 @@
108 108 @endif
109 109 </td>
110 110 <td class="px-4 py-3 text-sm">
111   - {{ $user->created_at }}
  111 + {{ date('d.m.Y h:i:s', strtotime($user->created_at)) }}
112 112 </td>
113 113 <td class="px-4 py-3 text-sm">
114 114 <!--if ($user->id > 1)-->
resources/views/admin/worker/index_ajax.blade.php
... ... @@ -58,7 +58,7 @@
58 58 @endif
59 59 </td>
60 60 <td class="px-4 py-3 text-sm">
61   - {{ $user->created_at }}
  61 + {{ date('d.m.Y h:i:s', strtotime($user->created_at)) }}
62 62 </td>
63 63 <td class="px-4 py-3 text-sm">
64 64 @if ($user->id > 1)
... ... @@ -68,11 +68,11 @@
68 68 @endif
69 69 @endif
70 70 </td>
71   - <td class="px-4 py-3 text-sm">
  71 + <!--<td class="px-4 py-3 text-sm">
72 72 @if ($user->id > 1)
73 73 <input type="checkbox" class="checkban" value="{{$user->id}}" name="ban_{{$user->id}}" {{ ($user->is_ban) ? "checked" : "" }}/>
74 74 @endif
75   - </td>
  75 + </td>-->
76 76 </tr>
77 77 @endforeach
78 78 </tbody>
resources/views/layout/admin.blade.php
... ... @@ -38,8 +38,10 @@
38 38 class="absolute inset-y-0 left-0 w-1 bg-purple-600 rounded-tr-lg rounded-br-lg"
39 39 aria-hidden="true"
40 40 ></span>
  41 + <!--class="inline-flex items-center w-full text-sm font-semibold text-gray-800 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 dark:text-gray-100"
  42 + -->
41 43 <a
42   - class="inline-flex items-center w-full text-sm font-semibold text-gray-800 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 dark:text-gray-100"
  44 + class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.index') ? 'dark:text-gray-100' : null }}"
43 45 href="{{ route('admin.index') }}"
44 46 >
45 47 <svg
... ... @@ -64,7 +66,7 @@
64 66 @if ($UserId == 1)
65 67 <li class="relative px-6 py-3">
66 68 <a
67   - class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"
  69 + class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.users') ? 'dark:text-gray-100' : null }}"
68 70 href="{{ route('admin.users') }}"
69 71 >
70 72 <svg
... ... @@ -86,9 +88,29 @@
86 88 </li>
87 89 @endif
88 90 <li class="relative px-6 py-3">
  91 + <a
  92 + class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.admin-users') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.admin-users') }}"
  93 + >
  94 + <svg
  95 + class="w-5 h-5"
  96 + aria-hidden="true"
  97 + fill="none"
  98 + stroke-linecap="round"
  99 + stroke-linejoin="round"
  100 + stroke-width="2"
  101 + viewBox="0 0 24 24"
  102 + stroke="currentColor"
  103 + >
  104 + <path
  105 + d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"
  106 + ></path>
  107 + </svg>
  108 + <span class="ml-4">Администраторы</span>
  109 + </a>
  110 + </li>
  111 + <li class="relative px-6 py-3">
89 112 <a
90   - class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"
91   - href="{{ route('admin.employers') }}"
  113 + class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.employers') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.employers') }}"
92 114 >
93 115 <svg
94 116 class="w-5 h-5"
... ... @@ -109,8 +131,7 @@
109 131 </li>
110 132 <li class="relative px-6 py-3">
111 133 <a
112   - class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"
113   - href="{{ route('admin.workers') }}"
  134 + class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.workers') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.workers') }}"
114 135 >
115 136 <svg
116 137 class="w-5 h-5"
... ... @@ -132,8 +153,7 @@
132 153 </li>
133 154 <li class="relative px-6 py-3">
134 155 <a
135   - class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"
136   - href="{{ route('admin.ad-employers') }}"
  156 + class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.ad-employers') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.ad-employers') }}"
137 157 >
138 158 <svg
139 159 class="w-5 h-5"
... ... @@ -155,8 +175,7 @@
155 175  
156 176 <li class="relative px-6 py-3">
157 177 <a
158   - class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"
159   - href="{{ route('admin.messages') }}"
  178 + class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.messages') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.messages') }}"
160 179 >
161 180 <svg
162 181 class="w-5 h-5"
... ... @@ -175,8 +194,7 @@
175 194 </li>
176 195 <li class="relative px-6 py-3">
177 196 <a
178   - class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"
179   - href="{{ route('admin.groups') }}"
  197 + class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.groups') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.groups') }}"
180 198 >
181 199 <svg
182 200 class="w-5 h-5"
... ... @@ -197,8 +215,7 @@
197 215 </li>
198 216 @if ($UserId == 1)
199 217 <li class="relative px-6 py-3">
200   - <a class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"
201   - href="{{ route('admin.roles') }}">
  218 + <a class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.roles') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.roles') }}">
202 219 <svg
203 220 class="w-5 h-5"
204 221 aria-hidden="true"
... ... @@ -219,8 +236,7 @@
219 236 @endif
220 237 <li class="relative px-6 py-3">
221 238 <a
222   - class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"
223   - href="{{ route('admin.statics') }}"
  239 + class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.statics') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.statics') }}"
224 240 >
225 241 <svg
226 242 class="w-5 h-5"
... ... @@ -242,8 +258,7 @@
242 258 </li>
243 259 <li class="relative px-6 py-3">
244 260 <a
245   - class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"
246   - href="{{ route('admin.answers') }}"
  261 + class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.answers') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.answers') }}"
247 262 >
248 263 <svg
249 264 class="w-5 h-5"
... ... @@ -306,19 +321,19 @@
306 321 class="p-2 mt-2 space-y-2 overflow-hidden text-sm font-medium text-gray-500 rounded-md shadow-inner bg-gray-50 dark:text-gray-400 dark:bg-gray-900"
307 322 aria-label="submenu"
308 323 >
309   - <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200">
  324 + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.job-titles.index') ? 'dark:text-gray-100' : null }}">
310 325 <a class="w-full" href="{{ route('admin.job-titles.index') }}">Должности</a>
311 326 </li>
312   - <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200">
  327 + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.categories.index') ? 'dark:text-gray-100' : null }}">
313 328 <a class="w-full" href="{{ route('admin.categories.index') }}">Категории вакансий</a>
314 329 </li>
315   - <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200">
  330 + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.category-emp.index') ? 'dark:text-gray-100' : null }}">
316 331 <a class="w-full" href="{{ route('admin.category-emp.index') }}">Категории работодателей</a>
317 332 </li>
318   - <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200">
  333 + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.education.index') ? 'dark:text-gray-100' : null }}">
319 334 <a class="w-full" href="{{ route('admin.education.index') }}">Образование</a>
320 335 </li>
321   - <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200">
  336 + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.infobloks.index') ? 'dark:text-gray-100' : null }}">
322 337 <a class="w-full" href="{{ route('admin.infobloks.index') }}">Блоки-Дипломы</a>
323 338 </li>
324 339  
... ... @@ -373,25 +388,25 @@
373 388 class="p-2 mt-2 space-y-2 overflow-hidden text-sm font-medium text-gray-500 rounded-md shadow-inner bg-gray-50 dark:text-gray-400 dark:bg-gray-900"
374 389 aria-label="submenu"
375 390 >
376   - <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200">
  391 + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.editor-site') ? 'dark:text-gray-100' : null }}">
377 392 <a class="w-full" href="{{ route('admin.editor-site') }}">Редактор сайта</a>
378 393 </li>
379   - <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200">
  394 + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.edit-blocks') ? 'dark:text-gray-100' : null }}">
380 395 <a class="w-full" href="{{ route('admin.edit-blocks') }}">Шапка-футер сайта</a>
381 396 </li>
382   - <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200">
  397 + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.reclames') ? 'dark:text-gray-100' : null }}">
383 398 <a class="w-full" href="{{ route('admin.reclames') }}">Реклама</a>
384 399 </li>
385   - <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200">
  400 + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.editor-seo') ? 'dark:text-gray-100' : null }}">
386 401 <a class="w-full" href="{{ route('admin.editor-seo') }}">SEO сайта</a>
387 402 </li>
388   - <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200">
  403 + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.editor-pages') ? 'dark:text-gray-100' : null }}">
389 404 <a class="w-full" href="{{ route('admin.editor-pages') }}">Редактор страниц</a>
390 405 </li>
391   - <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200">
  406 + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.job-titles-main') ? 'dark:text-gray-100' : null }}">
392 407 <a class="w-full" href="{{ route('admin.job-titles-main') }}">Должности на главной</a>
393 408 </li>
394   - <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200">
  409 + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.employers-main') ? 'dark:text-gray-100' : null }}">
395 410 <a class="w-full" href="{{ route('admin.employers-main') }}">Работодатели на главной</a>
396 411 </li>
397 412 </ul>
... ... @@ -447,8 +462,7 @@
447 462 aria-hidden="true"
448 463 ></span>
449 464 <a
450   - class="inline-flex items-center w-full text-sm font-semibold text-gray-800 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 dark:text-gray-100"
451   - href="{{ route('admin.index') }}"
  465 + class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.index') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.index') }}"
452 466 >
453 467 <svg
454 468 class="w-5 h-5"
... ... @@ -471,8 +485,7 @@
471 485 <ul>
472 486 @if ($UserId == 1)
473 487 <li class="relative px-6 py-3">
474   - <a class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"
475   - href="{{ route('admin.users') }}">
  488 + <a class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.users') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.users') }}">
476 489 <svg
477 490 class="w-5 h-5"
478 491 aria-hidden="true"
... ... @@ -492,9 +505,30 @@
492 505 </li>
493 506 @endif
494 507 <li class="relative px-6 py-3">
  508 + <a
  509 + class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.admin-users') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.admin-users') }}"
  510 + >
  511 + <svg
  512 + class="w-5 h-5"
  513 + aria-hidden="true"
  514 + fill="none"
  515 + stroke-linecap="round"
  516 + stroke-linejoin="round"
  517 + stroke-width="2"
  518 + viewBox="0 0 24 24"
  519 + stroke="currentColor"
  520 + >
  521 + <path
  522 + d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"
  523 + ></path>
  524 + </svg>
  525 + <span class="ml-4">Администраторы</span>
  526 + </a>
  527 + </li>
  528 +
  529 + <li class="relative px-6 py-3">
495 530 <a
496   - class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"
497   - href="{{ route('admin.employers') }}"
  531 + class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.employers') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.employers') }}"
498 532 >
499 533 <svg
500 534 class="w-5 h-5"
... ... @@ -515,8 +549,7 @@
515 549 </li>
516 550 <li class="relative px-6 py-3">
517 551 <a
518   - class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"
519   - href="{{ route('admin.workers') }}"
  552 + class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.workers') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.workers') }}"
520 553 >
521 554 <svg
522 555 class="w-5 h-5"
... ... @@ -538,8 +571,7 @@
538 571 </li>
539 572 <li class="relative px-6 py-3">
540 573 <a
541   - class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"
542   - href="{{ route('admin.ad-employers') }}"
  574 + class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.ad-employers') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.ad-employers') }}"
543 575 >
544 576 <svg
545 577 class="w-5 h-5"
... ... @@ -560,8 +592,7 @@
560 592 </li>
561 593 <li class="relative px-6 py-3">
562 594 <a
563   - class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"
564   - href="{{ route('admin.messages') }}"
  595 + class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.messages') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.messages') }}"
565 596 >
566 597 <svg
567 598 class="w-5 h-5"
... ... @@ -579,8 +610,7 @@
579 610 </a>
580 611 </li>
581 612 <li class="relative px-6 py-3">
582   - <a class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"
583   - href="{{ route('admin.groups') }}">
  613 + <a class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.groups') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.groups') }}">
584 614 <svg
585 615 class="w-5 h-5"
586 616 aria-hidden="true"
... ... @@ -600,8 +630,7 @@
600 630 </li>
601 631 @if ($UserId == 1)
602 632 <li class="relative px-6 py-3">
603   - <a class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"
604   - href="{{ route('admin.roles') }}">
  633 + <a class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.roles') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.roles') }}">
605 634 <svg
606 635 class="w-5 h-5"
607 636 aria-hidden="true"
... ... @@ -622,8 +651,7 @@
622 651 @endif
623 652 <li class="relative px-6 py-3">
624 653 <a
625   - class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"
626   - href="{{ route('admin.statics') }}"
  654 + class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.statics') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.statics') }}"
627 655 >
628 656 <svg
629 657 class="w-5 h-5"
... ... @@ -645,8 +673,7 @@
645 673 </li>
646 674 <li class="relative px-6 py-3">
647 675 <a
648   - class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"
649   - href="{{ route('admin.messages') }}"
  676 + class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.messages') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.messages') }}"
650 677 >
651 678 <svg
652 679 class="w-5 h-5"
... ... @@ -709,19 +736,19 @@
709 736 class="p-2 mt-2 space-y-2 overflow-hidden text-sm font-medium text-gray-500 rounded-md shadow-inner bg-gray-50 dark:text-gray-400 dark:bg-gray-900"
710 737 aria-label="submenu"
711 738 >
712   - <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200">
  739 + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.job-titles.index') ? 'dark:text-gray-100' : null }}">
713 740 <a class="w-full" href="{{ route('admin.job-titles.index') }}">Должности</a>
714 741 </li>
715   - <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200">
  742 + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.categories.index') ? 'dark:text-gray-100' : null }}">
716 743 <a class="w-full" href="{{ route('admin.categories.index') }}">Категории вакансий</a>
717 744 </li>
718   - <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200">
  745 + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.category-emp.index') ? 'dark:text-gray-100' : null }}">
719 746 <a class="w-full" href="{{ route('admin.category-emp.index') }}">Категории работодателей</a>
720 747 </li>
721   - <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200">
  748 + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.education.index') ? 'dark:text-gray-100' : null }}">
722 749 <a class="w-full" href="{{ route('admin.education.index') }}">Образование</a>
723 750 </li>
724   - <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200">
  751 + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.infobloks.index') ? 'dark:text-gray-100' : null }}">
725 752 <a class="w-full" href="{{ route('admin.infobloks.index') }}">Блоки-Дипломы</a>
726 753 </li>
727 754  
... ... @@ -778,25 +805,25 @@
778 805 class="p-2 mt-2 space-y-2 overflow-hidden text-sm font-medium text-gray-500 rounded-md shadow-inner bg-gray-50 dark:text-gray-400 dark:bg-gray-900"
779 806 aria-label="submenu"
780 807 >
781   - <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200">
  808 + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.editor-site') ? 'dark:text-gray-100' : null }}">
782 809 <a class="w-full" href="{{ route('admin.editor-site') }}">Редактор сайта</a>
783 810 </li>
784   - <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200">
  811 + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.edit-blocks') ? 'dark:text-gray-100' : null }}">
785 812 <a class="w-full" href="{{ route('admin.edit-blocks') }}">Шапка-футер сайта</a>
786 813 </li>
787   - <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200">
  814 + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.reclames') ? 'dark:text-gray-100' : null }}">
788 815 <a class="w-full" href="{{ route('admin.reclames') }}">Реклама</a>
789 816 </li>
790   - <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200">
  817 + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.editor-seo') ? 'dark:text-gray-100' : null }}">
791 818 <a class="w-full" href="{{ route('admin.editor-seo') }}">SEO сайта</a>
792 819 </li>
793   - <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200">
  820 + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.editor-pages') ? 'dark:text-gray-100' : null }}">
794 821 <a class="w-full" href="{{ route('admin.editor-pages') }}">Редактор страниц</a>
795 822 </li>
796   - <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200">
  823 + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.job-titles-main') ? 'dark:text-gray-100' : null }}">
797 824 <a class="w-full" href="{{ route('admin.job-titles-main') }}">Должности на главной</a>
798 825 </li>
799   - <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200">
  826 + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.employers-main') ? 'dark:text-gray-100' : null }}">
800 827 <a class="w-full" href="{{ route('admin.employers-main') }}">Работодатели на главной</a>
801 828 </li>
802 829  
... ... @@ -1762,6 +1789,7 @@
1762 1789 </main>
1763 1790 </div>
1764 1791 </div>
  1792 +@yield('modal')
1765 1793 </body>
1766 1794 @yield('script')
1767 1795 </html>
... ... @@ -161,7 +161,7 @@ Route::group([
161 161 // кабинет профиль работодатель - сохранение формы
162 162 Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile');
163 163 // кабинет удаление профиль работодателя и юзера
164   - Route::delete('employer-profile/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer');
  164 + Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer');
165 165  
166 166 // кабинет профиль работник - форма
167 167 Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit');
... ... @@ -213,6 +213,9 @@ Route::group([
213 213  
214 214 // кабинет - сообщения (чтение чужих)
215 215 Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages');
  216 + // кабинет - просмотр сообщения чужого (чтение)
  217 + Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message');
  218 +
216 219 // кабинет - сообщения (админские)
217 220 Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages');
218 221 // кабинет - сообщения (админские)
... ... @@ -334,3 +337,5 @@ Route::post(&#39;ckeditor/upload&#39;, [CKEditorController::class, &#39;upload&#39;])-&gt;name(&#39;cke
334 337 Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page');
335 338  
336 339 Route::get('redis/', [PagesController::class, 'redis'])->name('redis');
  340 +
  341 +Route::get('excel/', [PagesController::class, 'excel'])->name('excel');