From 330dc3881004c08dedb59dd449c1ad0fba517aad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=20=D0=9B=D0=B0=D1=80?= =?UTF-8?q?=D0=B8=D0=BE=D0=BD=D0=BE=D0=B2?= Date: Thu, 6 Jun 2024 17:05:37 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9A=D0=BE=D0=BC=D0=BC=D0=B8=D1=82=20=D0=BE=D0=B1?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BE=D1=82=20?= =?UTF-8?q?=D1=87=D0=B5=D1=82=D0=B2=D0=B5=D1=80=D0=B3=D0=B0=206=20=D0=B8=D1=8E?= =?UTF-8?q?=D0=BD=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/EmployerController.php | 4 +-- app/Http/Requests/PagesRequest.php | 4 +-- app/Models/pages.php | 1 + .../2024_06_06_092618_alter_table_pages.php | 32 ++++++++++++++++++++ resources/views/admin/pages/form.blade.php | 8 ++--- resources/views/employers/menu.blade.php | 6 ++-- resources/views/pages.blade.php | 2 +- 7 files changed, 44 insertions(+), 13 deletions(-) create mode 100644 database/migrations/2024_06_06_092618_alter_table_pages.php diff --git a/app/Http/Controllers/EmployerController.php b/app/Http/Controllers/EmployerController.php index 8837dbd..f6bcce1 100644 --- a/app/Http/Controllers/EmployerController.php +++ b/app/Http/Controllers/EmployerController.php @@ -302,7 +302,7 @@ class EmployerController extends Controller $vac_emp->updated_at = $up; $vac_emp->save(); - return redirect()->route('employer.vacancy_list'); + return redirect()->back(); //route('employer.vacancy_list'); // начало конца } @@ -477,7 +477,7 @@ class EmployerController extends Controller } else { $user = $this->create($params); event(new Registered($user)); - + Mail::to(env('EMAIL_ADMIN'))->send(new MailCreateEmployer($params)); Auth::guard()->login($user); diff --git a/app/Http/Requests/PagesRequest.php b/app/Http/Requests/PagesRequest.php index cc9ad7f..794ed3c 100644 --- a/app/Http/Requests/PagesRequest.php +++ b/app/Http/Requests/PagesRequest.php @@ -54,11 +54,9 @@ class PagesRequest extends FormRequest ], 'anons' => [ 'required', - 'min:50', ], - 'text' => [ + 'text2' => [ 'required', - 'min:255', ], 'image' => [ 'mimes:jpeg,jpg,png', diff --git a/app/Models/pages.php b/app/Models/pages.php index 420228d..7e414f2 100644 --- a/app/Models/pages.php +++ b/app/Models/pages.php @@ -16,5 +16,6 @@ class pages extends Model 'anons', 'author', 'image', + 'text2' ]; } diff --git a/database/migrations/2024_06_06_092618_alter_table_pages.php b/database/migrations/2024_06_06_092618_alter_table_pages.php new file mode 100644 index 0000000..40c8aff --- /dev/null +++ b/database/migrations/2024_06_06_092618_alter_table_pages.php @@ -0,0 +1,32 @@ +longText('text2')->nullable(true); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('pages', function (Blueprint $table) { + $table->dropColumn('text2'); + }); + } +}; diff --git a/resources/views/admin/pages/form.blade.php b/resources/views/admin/pages/form.blade.php index 5ff1252..968e382 100644 --- a/resources/views/admin/pages/form.blade.php +++ b/resources/views/admin/pages/form.blade.php @@ -86,9 +86,9 @@