Example #1
0
 public static function boot()
 {
     parent::boot();
     //删除时先删除相关文档、单页
     self::deleting(function (User $user) {
         Article::where('uid', '=', $user->id)->delete();
         Page::where('uid', '=', $user->id)->delete();
     });
 }
Example #2
0
 public static function boot()
 {
     parent::boot();
     self::updated(function ($user) {
         /*
          * Update the locale (since its stored in a session variable we need to update it)
          * when changed in profile or use just logged in.
          */
         if (user() and user()->id == $user->id) {
             Session::forget('app.locale');
         }
     });
 }
Example #3
0
 /**
  * Set the Sentry User Model Hasher to be the same as the configured Sentry Hasher
  */
 public static function boot()
 {
     parent::boot();
     static::setHasher(app()->make('sentry.hasher'));
 }
Example #4
0
 /**
  * Boot.
  */
 public static function boot()
 {
     parent::boot();
     self::$hasher = new \Cartalyst\Sentry\Hashing\BcryptHasher();
 }
Example #5
0
 public static function boot()
 {
     parent::boot();
 }