src/Controllers/Auth/SessionController.php
public function postLogin(Request $request)
    {
        // Validate the Form Data
        $result = $this->validate($request, [
            'email' => 'required',
            'password' => 'required'
        ]);

        // Assemble Login Credentials
        $credentials = [
            'email' => trim($request->get('email')),
            'password' => $request->get('password'),
        ];
        $remember = (bool)$request->get('remember', false);

        // Attempt the Login
        $result = $this->authManager->authenticate($credentials, $remember);

        // Return the appropriate response
        $path = session()->pull('url.intended', route('dashboard'));
        return $result->dispatch($path);
    }
public function postLogin(Request $request)
    {
        // Validate the Form Data
        $result = $this->validate($request, [
            'email' => 'required',
            'password' => 'required'
        ]);

        // Assemble Login Credentials
        $credentials = [
            'email' => trim($request->get('email')),
            'password' => $request->get('password'),
        ];
        $remember = (bool)$request->get('remember', false);

        // Attempt the Login
        $result = $this->authManager->authenticate($credentials, $remember);

        // Return the appropriate response
        $path = session()->pull('url.intended', route('dashboard'));
        return $result->dispatch($path);
    }
public function postLogin ( Request $ request ) { // Validate the Form Data $ result = $ this -> validate ( $ request , [ 'email' => 'required' , 'password' => 'required' ] ) ; // Assemble Login Credentials $ credentials = [ 'email' => trim ( $ request -> get ( 'email' ) ) , 'password' => $ request -> get ( 'password' ) , ] ; $ remember = ( bool ) $ request -> get ( 'remember' , false ) ; // Attempt the Login $ result = $ this -> authManager -> authenticate ( $ credentials , $ remember ) ; // Return the appropriate response $ path = session ( ) -> pull ( 'url.intended' , route ( 'dashboard' ) ) ; return $ result -> dispatch ( $ path ) ; }
Handle a Login Request
@return Response|Redirect
Handle a Login Request