S
S
Stanislav Pochepko2016-01-28 13:14:36
Laravel
Stanislav Pochepko, 2016-01-28 13:14:36

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
}

And when I try to get the current user model through 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

1 answer(s)
Станислав Почепко, 2016-01-28
@DJZT

А решение я нашёл. Надо было переключить в настройках Sentinel модель на собственную и унаследовать её от сентинел.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question