title: In my project if and else or else if condition is not working what can i do for that?
body: <pre><code>if (Registration::where(['email', '=', $email, 'password', '=', $pwd, 'is admin', '=', 1]))
  {
      Session()-&gt;put('admin email', $email);
  
      return redirect('admin');
  }
  else
  {
      if (Registration::where(['email', '=', Input::get('email'), 'password', '=', Input::get('password'), 'is admin', '=', 0]))
      {
          Session()-&gt;put('email', $email);
  
          return redirect('/');
      }
  }
  </code></pre>
  
  <p>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 </p>