コード例 #1
0
ファイル: AuthToken.php プロジェクト: CFLOVEYR/hook
 public static function boot()
 {
     parent::boot();
     static::creating(function ($model) {
         $model->beforeCreate();
     });
 }
コード例 #2
0
ファイル: AppKey.php プロジェクト: CFLOVEYR/hook
 public static function boot()
 {
     parent::boot();
     static::saving(function ($instance) {
         $instance->beforeSave();
     });
 }
コード例 #3
0
ファイル: App.php プロジェクト: CFLOVEYR/hook
 public static function boot()
 {
     parent::boot();
     static::creating(function ($instance) {
         $instance->beforeCreate();
     });
     static::created(function ($instance) {
         $instance->afterCreate();
     });
 }