mercredi 25 septembre 2019

In my project if and else or else if condition is not working what can i do for that?

if(Registration::where(['email', '=', $email,'password', '=', $pwd,'is admin', '=', 1]))
        {Session()->put('admin email',$email);
            return redirect('admin');
        }
        else if(Registration::where(['email', '=', Input::get('email'),'password', '=',Input::get('password'),'is admin', '=', 0]))
        {
            Session()->put('email',$email);
            return  redirect('/');
        }

any unregistered user can login and not checking from if and else if condition first if can work if i can change that redirected path then it will goes that path



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire