Note that there are some explanatory texts on larger screens.

plurals
  1. POLaravel 4 Auth:attempt not working
    text
    copied!<p>I am having hard time working with Laravel 4 Auth::attempt method , followed the right documentation, read couple of SO threads but still i am not able to get it working.</p> <pre><code>$userData = array('email' =&gt; 'admin@admin.com','password' =&gt; 'admin'); if(Auth::attempt($userData)){ // redirect } else{ echo 'Invalid'; } </code></pre> <p>And it returns Invalid everytime</p> <p>Now i am not sure what is the actual reason.</p> <p>In my config/auth.php i have following</p> <pre><code>&lt;?php return array( /* |-------------------------------------------------------------------------- | Default Authentication Driver |-------------------------------------------------------------------------- | | This option controls the authentication driver that will be utilized. | This drivers manages the retrieval and authentication of the users | attempting to get access to protected areas of your application. | | Supported: "database", "eloquent" | */ 'driver' =&gt; 'eloquent', /* |-------------------------------------------------------------------------- | Authentication Model |-------------------------------------------------------------------------- | | When using the "Eloquent" authentication driver, we need to know which | Eloquent model should be used to retrieve your users. Of course, it | is often just the "User" model but you may use whatever you like. | */ 'model' =&gt; 'User', /* |-------------------------------------------------------------------------- | Authentication Table |-------------------------------------------------------------------------- | | When using the "Database" authentication driver, we need to know which | table should be used to retrieve your users. We have chosen a basic | default value but you may easily change it to any table you like. | */ 'table' =&gt; 'users', /* |-------------------------------------------------------------------------- | Password Reminder Settings |-------------------------------------------------------------------------- | | Here you may set the settings for password reminders, including a view | that should be used as your password reminder e-mail. You will also | be able to set the name of the table that holds the reset tokens. | */ 'reminder' =&gt; array( 'email' =&gt; 'emails.auth.reminder', 'table' =&gt; 'password_reminders', ), ); ?&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload