Open sidebar
## Controller Dosyası Auth public function store(LoginRequest $request) { $credentials = $request->only("email",bcrypt("password")); if ($credentials) { $url = ''; $request->authenticate(); $request->session()->regenerate(); $role = Auth::user()->role; if ($role == 'admin') { $url = '/admin/dashboard'; }elseif ($role == 'customer') { $url = '/customer/dashboard'; }elseif ($role == 'sales') { $url = '/sales/dashboard'; }elseif ($role == 'project') { $url = '/project/dashboard'; }elseif ($role == 'technic') { $url = '/technic/dashboard'; }elseif ($role == 'accounting') { $url = '/accounting/dashboard'; } return response() ->json([ "success" => "ok", "type" => "success", "message" => "Sisteme Giriş Yapılıyor.", "redirect" => $url, "title" => "Başarılı!"],200); } else { return response() ->json([ "success" => "no", "redirect" => "/login", "type" => "error", "message" => "Boş Alan Bırakmayınız!", "title" => "Başarısız!" ]); } }
Close sidebar
Back
Please note that all pasted data is publicly available.
X (fomerly Twitter)
GitHub
Use setting
Back
Please note that all pasted data is publicly available.
X (fomerly Twitter)
GitHub
Use setting