Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is actually a comment to @Hexodus response, but I don't have the required points to comment.</p> <p>You can actually have your User authentication named whatever you want, for instance</p> <ul> <li>Model: <code>Turtle</code></li> <li>Table: <code>turtles</code></li> </ul> <p>But you have to go into <code>app\config\auth.php</code> and change the <code>'model' =&gt; '...'</code> and <code>'table' =&gt; '...'</code> values in order for Laravel's authentication to work. </p> <p>Also, <a href="http://four.laravel.com/docs/security" rel="nofollow">according to the docs</a>, you don't even need <code>'username'</code> or <code>'password'</code> explicitly defined as such in your database</p> <pre><code>if (Auth::attempt(array('email' =&gt; $email, 'password' =&gt; $password))) { return Redirect::intended('dashboard'); } </code></pre> <blockquote> <p>Take note that 'email' is not a required option, it is merely used for example. You should use whatever column name corresponds to a "username" in your database. The Redirect::intended function will redirect the user to the URL they were trying to access before being caught by the authentication filter. A fallback URI may be given to this method in case the intended destination is not available.</p> </blockquote> <p>Effectively, <code>'email'</code> in this instance is considered a <code>'username'</code></p> <hr> <p>Edit, and because I was having trouble with this at first, you <strong>do not</strong> need to hash passwords when you use <code>Auth::attempt(...)</code>. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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