3
dashboard
adresine yeniden yönlendirilmek yerine giriş yaptığım zaman auth controller cihazımda /
adresine yönlendirilirim Aşağıdaki satırı yorumladım ancak neden hatalı bir konuma yönlendirildim hala?Giriş Yanlış konuma yönlendirin
php artisan cache:clear
açtılar
Hat Çıkışı Yorumlananlar:
protected $redirectTo = '/';
Girişi Fonksiyonu:
public function postLogin(Request $request)
{
$credentials = $this->getLoginCredentials($request);
if(Auth::attempt($credentials))
{
redirect()->intended('dashboard');
}
return redirect()->back();
}
Yolları:
Route::group(['namespace' => 'Admin', 'prefix' => 'admin', 'middleware' => 'web'], function() {
/* Admin Auth */
Route::get('login', 'Auth\[email protected]');
Route::post('login', 'Auth\[email protected]');
Route::get('register', 'Auth\[email protected]');
Route::post('register', 'Auth\[email protected]');
Route::get('logout', 'Auth\[email protected]');
Route::group(['middleware' => 'auth.admin'], function(){
/*Admin Dashboard Routes */
Route::get('dashboard', '[email protected]');
});
});