framework icon indicating copy to clipboard operation
framework copied to clipboard

[12.x] isSoftDeletable(), isPrunable(), and isMassPrunable() to model class

Open shaedrich opened this issue 6 months ago • 0 comments

Before

if (in_array(MassPrunable::class, class_uses_recursive($myClass))) {
    // …
}

After

if ($myClass::isSoftDeletable()) {
    // …
}

Alternatives

  • Property hook

shaedrich avatar Jun 17 '25 00:06 shaedrich