@@ -252,18 +252,24 @@ abstract class Model implements Arrayable, ArrayAccess, CanBeEscapedWhenCastToSt
252
252
253
253
/**
254
254
* Whether it implements the SoftDeletes trait.
255
+ *
256
+ * @var array<class-string<self>, bool>
255
257
*/
256
- protected static bool $ isSoftDeletable ;
258
+ protected static array $ isSoftDeletable ;
257
259
258
260
/**
259
261
* Whether it implements the Prunable trait.
262
+ *
263
+ * @var array<class-string<self>, bool>
260
264
*/
261
- protected static bool $ isPrunable ;
265
+ protected static array $ isPrunable ;
262
266
263
267
/**
264
268
* Whether it implements the MassPrunable trait.
269
+ *
270
+ * @var array<class-string<self>, bool>
265
271
*/
266
- protected static bool $ isMassPrunable ;
272
+ protected static array $ isMassPrunable ;
267
273
268
274
/**
269
275
* The name of the "created at" column.
@@ -2309,23 +2315,23 @@ public function setPerPage($perPage)
2309
2315
*/
2310
2316
public static function isSoftDeletable (): bool
2311
2317
{
2312
- return self ::$ isSoftDeletable ??= in_array (SoftDeletes::class, class_uses_recursive (static ::class));
2318
+ return static ::$ isSoftDeletable[ static ::class] ??= in_array (SoftDeletes::class, class_uses_recursive (static ::class));
2313
2319
}
2314
2320
2315
2321
/**
2316
2322
* Determine if the model is prunable.
2317
2323
*/
2318
2324
protected function isPrunable (): bool
2319
2325
{
2320
- return self ::$ isPrunable ??= in_array (Prunable::class, class_uses_recursive (static ::class)) || static ::isMassPrunable ();
2326
+ return self ::$ isPrunable[ static ::class] ??= in_array (Prunable::class, class_uses_recursive (static ::class)) || static ::isMassPrunable ();
2321
2327
}
2322
2328
2323
2329
/**
2324
2330
* Determine if the model is mass prunable.
2325
2331
*/
2326
2332
protected function isMassPrunable (): bool
2327
2333
{
2328
- return self ::$ isMassPrunable ??= in_array (MassPrunable::class, class_uses_recursive (static ::class));
2334
+ return self ::$ isMassPrunable[ static ::class] ??= in_array (MassPrunable::class, class_uses_recursive (static ::class));
2329
2335
}
2330
2336
2331
2337
/**
0 commit comments