I'm trying to use the scaffolding created by the artisan make:auth
command for laravel 5.3, but to replace the functions there with Sentinel. In the create method of the RegisterController, I'm making the call to sentinel like so:
return Sentinel::register([
'email' => $data['email'],
'password' => $data['password'],
]);
But I'm getting an error when trying to run this.
FatalThrowableError in SessionGuard.php line 441:
Type error: Argument 1 passed to Illuminate\Auth\SessionGuard::login() must be an
instance of Illuminate\Contracts\Auth\Authenticatable, instance of
Cartalyst\Sentinel\Users\EloquentUser given,
called in /Applications/MAMP/htdocs/*****/vendor/laravel/framework/src/Illuminate/Foundation/Auth/RegistersUsers.php on line 35
I'm guessing this is because the Sentinel::register method doesn't return an instance of this user. How would I go about getting an instance of the Sentinel user back from the creation in this case?