Changeset View
Changeset View
Standalone View
Standalone View
src/app/Observers/EntitlementObserver.php
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | public function creating(Entitlement $entitlement) | ||||
} | } | ||||
$result = $sku->handler_class::preReq($entitlement, $wallet->owner); | $result = $sku->handler_class::preReq($entitlement, $wallet->owner); | ||||
if (!$result) { | if (!$result) { | ||||
return false; | return false; | ||||
} | } | ||||
} | } | ||||
public function created(Entitlement $entitlement) | |||||
{ | |||||
$entitlement->entitleable->updated_at = Carbon::now(); | |||||
$entitlement->entitleable->save(); | |||||
} | |||||
public function deleted(Entitlement $entitlement) | |||||
{ | |||||
$entitlement->entitleable->updated_at = Carbon::now(); | |||||
$entitlement->entitleable->save(); | |||||
} | |||||
} | } |