Multiple Authentication In Laravel Without Jetstream | Laravel Tutorial

Multiple Authentication In Laravel Without Jetstream | Laravel Tutorial

Web Tech Knowledge

3 года назад

16,800 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

sreythinh Loem
sreythinh Loem - 16.05.2023 07:19

thank you for sharing

Ответить
Technophile IT
Technophile IT - 07.04.2022 15:58

Npm install akunnilla

Ответить
Moin Khan
Moin Khan - 30.03.2022 11:21

very helpful video

Ответить
Nebal Al-Helou
Nebal Al-Helou - 03.03.2022 16:39

i get error everytime i want to logout ??

Ответить
Lazar Ristic
Lazar Ristic - 18.12.2021 19:06

perfect straight to problem solving

Ответить
arevev
arevev - 14.12.2021 14:27

why is there no error message Email Address OR Password Are Wrong ?if i enter incorrect it will redirect to login page but no error message?

Ответить
JEREMIAH FERNANDEZ
JEREMIAH FERNANDEZ - 07.12.2021 16:51

code for the login controller the one you have copy and pasted

Ответить
Tazimul islam Raj
Tazimul islam Raj - 03.11.2021 09:03

Which is best ? Jetstream or this

Ответить
gurman deep
gurman deep - 13.10.2021 21:22

Nice way 👍

Ответить
Navaneeth Sujeevan
Navaneeth Sujeevan - 24.08.2021 08:59

Thanku helpful😍

Ответить
Dipali Mahore Kale vlog
Dipali Mahore Kale vlog - 11.08.2021 00:04

isadmin column is not reflected.
???

Ответить
DKS_Dev
DKS_Dev - 27.07.2021 21:29

public function login(Request $request)
{
$input = $request->all();
$this->validate($request,[
'email'=>'required|email',
'password'=>'required'
]);
$email = $request->input('email');
$password = $request->input('password');

if(Auth::attempt(['email' => $email, 'password' => $password]))
{

if (Auth::user()->is_admin == 1){
return redirect()->route('admin.home');
}
else {
return redirect()->route('homehome');
}
}
else{
return redirect()->route('login')->with('error','Email-Address And Password Are Wrong.');
}

}

Ответить
Fatima Khanfri
Fatima Khanfri - 26.05.2021 05:01

it was so useful thanks !

Ответить
Fatima Khanfri
Fatima Khanfri - 26.05.2021 05:00

i had a problum (Method Illuminate\Routing\Route::middleware does not exist.) erase middlware(is_admin) from the route

Ответить
Fatima Khanfri
Fatima Khanfri - 26.05.2021 04:58

public function login(Request $request)
{

$input= $request->all();
$this->validate($request, [
'email'=> 'required|email',
'password'=> 'required',
]);

if(auth()->attempt(array('email'=>$input['email'],'password'=> $input['password'])))
{
if(auth()->user()->is_admin == 1){
return redirect()->route('admin.home');}

else{ return redirect()->route('home');}
}

else{
return redirect()->route('login')
-> whith('error',"email and password are wrong!");
}



}

Ответить
Susmitha R
Susmitha R - 24.05.2021 12:45

thank you its is very useful

Ответить
osy krisdayanti
osy krisdayanti - 02.05.2021 19:24

what if the user and admin login simultaneously in the browser

Ответить
chamseddine hammami
chamseddine hammami - 02.05.2021 01:48

asa

Ответить