Answer the question
In order to leave comments, you need to log in
How to work with Cartalist Sentinel?
Good afternoon. I can't figure out what's wrong with the user models in Sentinel. My model inherits from Sentinel model
use Cartalyst\Sentinel\Users\EloquentUser;
class User extends EloquentUser {
protected $table = 'users';
protected $fillable = ['height', 'birthday', 'weight'];
// ....... My methods
}
Auth::user()
it returns null
. And when I do Sentinel::getUser()
, it returns only the base user model EloquentUser
, which, accordingly, does not have the methods I need written in the User model. What am I doing wrong?
Answer the question
In order to leave comments, you need to log in
А решение я нашёл. Надо было переключить в настройках Sentinel модель на собственную и унаследовать её от сентинел.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question