Problem

You need the change the authentication model from the default User.

Your application is using namespaces or you want to use a differently named model for users.

Solution

Edit app/config/auth.php to change the model.

    ‘model’ => ‘MyAppModelsUser’,

Discussion

Don’t forget the required interfaces.

If you’re using your own model it’s important that your model implements Auth’s UserInterface. If you’re implementing the password reminder feature it should also implement RemindableInterface.

<?php namespace MyAppModels;

use IlluminateAuthUserInterface;

use IlluminateAuthRemindersRemindableInterface;

class User extends Eloquent implements UserInterface, RemindableInterface

{


   

}

About the author

Changing Your Authentication Model Laravel