I created login related Issue about 3 days ago and got helped by author, but laravel default Authenticate Middleware not working, so I created one but it not working, it redirect me to the login page. I need full attention of author to solve my problem because without it my project not moving forword :(
I created login related Issue about 3 days ago and got helped by author, but laravel default Authenticate Middleware not working, so I created one but it not working, it redirect me to the login page. I need full attention of author to solve my problem because without it my project not moving forword :(
I also share my code in stackoverflow, I think author know me well. http://stackoverflow.com/questions/39248250/multi-auth-not-working-in-laravel-5-1
This is my custom Middleware
<?php namespace App\Http\Middleware;
use Closure; use Illuminate\Contracts\Auth\Guard;
class ApplicantAuth { /* * The Guard implementation. * @var Guard */ protected $auth;
}
And this is my route
Route::group(['middleware' => 'guest', 'prefix' => 'login'], function () { Route::get('/', array("as" => "applicant_login", 'uses' => 'Portal\HomeController@applicantLogin')); Route::post('applicant-auth', array("as" => "applicant_auth", 'uses' => 'Auth\AuthController@userAuth')); }); Route::group(['middleware' => 'applicant', 'prefix' => 'applicant-user'], function () { Route::get('dashboard', array("as" => "applicant_dashboard", 'uses' => 'Applicant\ApplicantController@getIndex')); });
AuthController.php public function userAuth(Request $request) { $this->validate($request, ['email' => 'required','password' => 'required']);