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
Post a Comment