A hasher has not been provided for the user A hasher has not been provided for the user laravel laravel

A hasher has not been provided for the user


The problem is when you configured Sentry to use User.php as your model it loses the Sentry hasher. The solution is to set the hasher when a user is registering

$user->setHasher(new Cartalyst\Sentry\Hashing\NativeHasher);


A better alternative to @Dylan Pierce suggestion is to set the hasher directly in the constructor of your user model.

public function __construct(){    $this->setHasher(new \Cartalyst\Sentry\Hashing\NativeHasher);}

note there are other different Hashers provided by Sentry and you can find them at this directory:vendor/cartalyst/sentry/src/Cartalyst/Sentry/Hashing/

Full Example:

use Cartalyst\Sentry\Users\Eloquent\User;use Cartalyst\Sentry\Hashing\NativeHasher as SentryNativeHasher;class Subscriber extends User{     public function __construct()     {          $this->setHasher(new SentryNativeHasher);     }}


If you want to use the setHasher method for the entire model; in order to preserve the Eloquent class constructor function, use the static method 'boot' which will be run from the Eloquent constructor class:

public static function boot(){    static::setHasher(new \Cartalyst\Sentry\Hashing\NativeHasher);}