app/Http/Controllers/Auth/LoginUserController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(Request $request)
    {
        $credentials = $request->only('email', 'password');
        if(Auth::attempt($credentials, $request->filled('remember'))) {
            $request ->session()->regenerate();
            Auth::login($credentials);
            return redirect('/');
            }   
             return back()->withErrors([
            'email' => 'The provided credentials do not match our records.',
                        ]);
        }
public function store ( Request $ request ) { $ credentials = $ request -> only ( 'email' , 'password' ) ; if ( Auth :: attempt ( $ credentials , $ request -> filled ( 'remember' ) ) ) { $ request -> session ( ) -> regenerate ( ) ; Auth :: login ( $ credentials ) ; return redirect ( '/' ) ; } return back ( ) -> withErrors ( [ 'email' => 'The provided credentials do not match our records.' , ] ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .