Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Target [App\Http\Requests\Request] is not instantiable

Tags:

laravel

I am unable to understand why this error appears. I have created a function for user to give its credentials and log in.

Route of the function is

Route::any('login','UserController@authenticate');

public function authenticate(Request $request) {
   if($request->isMethod('post')) {
   $email = $request->input('email');
   $password = $request->input('password');
   if(Auth::attempt(array('email' => $email, 'password' => $password), true)) {
   return redirect()->intended('publicPages.home_startup')->withErrors('Congratulations! You are logged in');
   } else {
return redirect()->intended('publicPages.login')->withErrors('Sorry! Login    Failed');
                }
            }
        }
like image 376
Qasim Ali Avatar asked May 06 '16 19:05

Qasim Ali


1 Answers

You will probably need this line of code in the top.

use Illuminate\Http\Request;

If you have it, you can upload the project to a repository to help better?

like image 140
ItaloMoralesF Avatar answered Oct 05 '22 12:10

ItaloMoralesF