Answer the question
In order to leave comments, you need to log in
How to make custom authorization on laravel 5.2?
Hello everyone, just started learning laravel.
I want to make custom authorization. It is necessary to authorize by 3 fields:
City/Login/Password
1. Executed php artisan make:auth
2. In routes.php I registered Route::post('/login', 'Auth\[email protected]');
3. In AuthController.php I created a function public function postLogin(Request $request) {...}
But when I try to follow the guides on the Internet, I run into errors.
I tried to check like this: if ($this->auth->attempt( $credentials, $remember))
I get Undefined property: App\Http\Controllers\Auth\AuthController::$auth
Tried like this: if (Auth::attempt($credentials, $remember))
I get Fatal error: Class 'App\ Http\Controllers\Auth\Auth' not found
Tell me what I don't understand? thank!
Answer the question
In order to leave comments, you need to log in
It is written to you on a paper - the class is not found.
Used \ - before global functions
\Auth::some()
\Request::some()
Auth::some()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question