dimanche 1 janvier 2017

How does check of authentication work in laravel?

I have the following line of code in my controller:

public function __construct() {
      $this->middleware('auth');
}

So basically what this line of code does is it checks before any method in the controller is run that the user is authenticated , I have a little confusion about this line of code though , what i want to know is where is this property middleware coming form ?? and how does this this method middleware really get included into my controller ??

Thank you.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire