Пример #1
0
 public static function boot()
 {
     parent::boot();
     RoyaltyShare::deleting(function ($royaltyShare) {
         $royaltyShare->deleted = 1;
         $royaltyShare->update();
     });
 }
Пример #2
0
 public static function boot()
 {
     parent::boot();
     RoyaltyProvider::deleting(function ($royaltyProvider) {
         $royaltyProvider->deleted = 1;
         $royaltyProvider->update();
     });
 }
Пример #3
0
 public static function boot()
 {
     parent::boot();
     Deal::deleting(function ($deal) {
         $deal->deleted = 1;
         $deal->update();
     });
 }
Пример #4
0
 public static function boot()
 {
     parent::boot();
     Company::created(function ($company) {
         AuthorizationToken::createAuthorizationToken($company);
         Credit::createCredit($company->id);
         Credit::createCredit($company->id, Credit::PAID);
     });
 }
Пример #5
0
 public static function boot()
 {
     parent::boot();
     User::created(function ($user) {
         if ($user->type == User::TYPE_PAYEE) {
             AuthorizationToken::createAuthorizationToken($user);
         }
     });
 }