lundi 1 octobre 2018

Laravel authorize() return

I would like to modify the return of this line, a more specific return when the user can not access. it shows me a 403, but wanted a custom return to the front end. What are the possible returns?

public function authorize()
 {
    if(Auth::user()->current_company_id == 0){
      return true;
}
        return false;
}



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire