public function __construct(array $attributes = array()) { // define dependencies // this is for when we are calling the model directly // these are usually defined by the IoC however as we are effectively breaking this to provide a consistent API // so we need to redefine them in the constructor // probably not the best approach... static::$hasher = \App::make('sentry.hasher'); static::$loginAttribute = \Config::get('cartalyst/sentry::users.login_attribute'); parent::__construct($attributes); }
/** * Create a new Eloquent model instance. * * @param array $attributes * @return void */ public function __construct(array $attributes = array()) { $this->{$this->getKeyName()} = (string) $this->generateNewId(); parent::__construct($attributes); }
/** * Indicates if the model should soft delete. * * @var bool */ public function __construct() { parent::__construct(); }