Undefined variable: errors in Laravel

You should make sure that in app/Http/Kernel.php in middlewareGroups property for web you have: \Illuminate\View\Middleware\ShareErrorsFromSession::class, in this array. Compare this with https://github.com/laravel/laravel/blob/master/app/Http/Kernel.php EDIT It seems you need to add ‘middleware’ => ‘web’ for route you are using or put \Illuminate\View\Middleware\ShareErrorsFromSession::class, into $middleware property array or Inside of the routes.php file try to create your routes … Read more

Custom Laravel validation messages

Laravel 5.7.* Also You can try something like this. For me is the easiest way to make custom messages in methods when you want to validate requests: public function store() { request()->validate([ ‘file’ => ‘required’, ‘type’ => ‘required’ ], [ ‘file.required’ => ‘You have to choose the file!’, ‘type.required’ => ‘You have to choose type … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)