diff --git a/src/Userstamps.php b/src/Userstamps.php index ea9fb4f..fbe05eb 100644 --- a/src/Userstamps.php +++ b/src/Userstamps.php @@ -24,13 +24,8 @@ public static function registerListeners() static::creating('Wildside\Userstamps\Listeners\Creating@handle'); static::updating('Wildside\Userstamps\Listeners\Updating@handle'); - if( method_exists(get_called_class(), 'deleting') ) - { + if (in_array('Illuminate\Database\Eloquent\SoftDeletes', class_uses(get_called_class()))) { static::deleting('Wildside\Userstamps\Listeners\Deleting@handle'); - } - - if( method_exists(get_called_class(), 'restoring') ) - { static::restoring('Wildside\Userstamps\Listeners\Restoring@handle'); } }