In the Sentry config files, you can specify which User class you want Sentry to use. Make sure your User model extends the Sentry User.
JeroenVanOort said:
In the Sentry config files, you can specify which User class you want Sentry to use. Make sure your User model extends the Sentry User.
Thanks for reply
What i did
In models/User.php
class User extends \Cartalyst\Sentry\Users\Eloquent\User implements UserInterface, RemindableInterface {
use \Codesleeve\Stapler\Stapler;
public function __construct(array $attributes = array()) {
$this->hasAttachedFile('avatar', [
'styles' => [
'avatar-small' => '29x29'
]
]);
parent::__construct($attributes);
}
In sentry config
'users' => array(
'model' => '\User',
),
But i got following error
Symfony \ Component \ Debug \ Exception \ FatalErrorException
Call to a member function url() on a non-object
--
Sentry::getUser()->avatar->url('avatar-small');
It woks , Actually i had to change config in app/config/package
but i did wrong
Now working fine.
Thanks JeroenVanOort
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community