SoftDeletingMacros
interface SoftDeletingMacros
Declare the builder macros that SoftDeletingScope adds, for static analysis.
Keep these signatures in step with the scope's macros.
Methods
Include soft-deleted models in the results, or exclude them when false.
Exclude soft-deleted models from the results.
Only include soft-deleted models in the results.
Restore the matching soft-deleted models.
Get the first matching model or create it, then restore it.
Create the model or get the matching one, then restore it.
Details
at line 21
SoftDeletingMacros
withTrashed(bool $withTrashed = true)
Include soft-deleted models in the results, or exclude them when false.
at line 26
SoftDeletingMacros
withoutTrashed()
Exclude soft-deleted models from the results.
at line 31
SoftDeletingMacros
onlyTrashed()
Only include soft-deleted models in the results.
at line 36
int
restore()
Restore the matching soft-deleted models.
at line 45
Model
restoreOrCreate(array $attributes = [], array $values = [])
Get the first matching model or create it, then restore it.
at line 54
Model
createOrRestore(array $attributes = [], array $values = [])
Create the model or get the matching one, then restore it.