What's New in Laravel 5.3? - Changes to the Auth Middleware

preview_player
Показать описание
With Laravel 5.3, default Authentication changed a bit - specifically the way you can protect routes with the auth middleware. This video gets you back on track!

Did you like it? Have a look at all the other videos on my channel :)

Рекомендации по теме
Комментарии
Автор

Oh, Thank you, again, I just watched your lavarel 5.2 Shopping Car tutorial and I wasn't able to do the same, now I can :D

raphaelandrade
Автор

oh thanks you save my time..tried to chge redirect when unauthenticat in many ways for a while ....but finally got it

fatamatojjohora
Автор

i'm really like your laravel series videos, thanks for sharing to us.

blissjaspis
Автор

Thanks for your tutorials!
Please, make the videos about the Passport! What I'm really missing now is to understand WHEN I should use the Passport (in which cases).
For example, if I'm building the API for the mobile apps, and I want to make simple (yet secure) sign up process for my users - should I use Passport (e.g. Password grand)? Will it be easy for the users to sign up?

yaroslavkabay
Автор

Thanks a lot, really appreciate that
I was stuck in redirection after logout...

keyurgadher
Автор

Your videos are awesome, please mind to add to your series a video on how to build a Multilanguage website in Laravel. That will be really great …

vignyteranova
Автор

Best channel on YouTube for Laravel help!

Martyncuz
Автор

The problem with this approach is that previously we could specify the auth guard so we could redirect based on guard (e.g. different login pages for users or admins). I don't see any way we can specify an auth guard for the exception handler so the only solution ends up being having to create a new middleware that acted like the authenticate middleware used to in 5.2.

lucaschociay
Автор

As always, nice video, good and comprehensible explanations, as to say in german: Mach weiter so!!!!

rockinrandalf
Автор

Hey Sir,

Could you be so kind and explain how to do the authentication working for the login part. I tried to do the same from your tutorials from 5.2 but I'm stuck. I don't really understand how to change in Handler.php. I changed only the routing part but it doesn't want to log in...

tamasandacian
Автор

I have added the auth middleware in route but its not working in laravel 5.4. when i type dashboard in url it goes to url even if not authenticated how can we make modification

tekbist
Автор

hi can you provide a tutorial on how to create 2 step auth with 2 login session?
Already build in Laravel system:
user -> user login -> dashboard
What i want to achieve here is
user -> company login section -> user login -> dashboard

jovendev
Автор

If you have admin authentication, you can use this code:

protected function unauthenticated($request, AuthenticationException $exception)
{
$guard=array_get($exception->guards(), 0);
switch($guard){
case 'admin':

break;
default:
$redirect=route('login');
break;

}
return $request->expectsJson()
? response()->json(['message' => $exception->getMessage()], 401)
: redirect()->guest($redirect);
}

nenadfemic
Автор

thank but after made changes in exception folder i am getting this below error could you help me

ErrorException in Router.php line 500:
trim() expects parameter 1 to be string, array given

shivachavala
Автор

if user logout then session destroy otherwise session not destroy ( like facebook style) how to solve this issue laravel 5.4

mdalizinnah
Автор

Someone could guide me how to use the middleware for a resource, I do not know how to pass the action roles as it does on individual routes. I did it as I show in the code but it did not work.

Route::resource('features', 'FeatureController', [
'middleware'=>'roles',
'roles' => ['admin', 'adviser']
]);

WilfredoTorresAriza
Автор

Can you please help me, i have a challenge executing the migrate command. it gives me error of this "
[PDOException]
SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected"

desmondkitsiliel
Автор

Nice video,
but what is the point of replacing middlware with that function?

MohammadBarhoush
Автор

Hello, i can download your playlist ?

asephamdani
Автор

I need a little help !!!
I am working on laravel 5.2, deployed it on server where latest composer and laravel is installed.
I am now getting the following error:
"cannot end a section without first starting one" in my every view. I checked my section, endsection and they are working fine on my localhost.
does any1 can help me ?

shahmirjadoon