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 @@