php - Laravel Lumen Call to undefined function App\Http\Controllers\back() -


hello working on own authentication system using laravel's lumen , getting error call undefined function app\http\controllers\back() whenever try login wrong credentials. function looks in controller:

public function loglink(request $request) {     $input = $request->all();     $user = array(         'username' => $input['username'],         'password' => $input['password']     );       if (auth::attempt($user)) {         $user = auth::user();         return view('auth.welcome', compact('user'));      } else {          return back()->withinput();      }  } 

is there need include/call in controller?

you can use back() shortland in laravel now. lumen need add redirect():

return redirect()->back()->withinput(); 

read more: http://lumen.laravel.com/docs/responses#redirects


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -