We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent efd8889 commit 11e8e3aCopy full SHA for 11e8e3a
src/TurboStreamResponseMacro.php
@@ -16,9 +16,11 @@ public function __construct(TurboStreamModelRenderer $renderer)
16
17
public function handle(Model $model, string $action = null)
18
{
19
- if (! $model->exists ||
20
- (method_exists($model, 'trashed') && $model->trashed())
21
- ) {
+ // We're treating soft-deleted models as they were deleted. In other words, we
+ // will render the deleted Turbo Stream. If you need to treat a soft-deleted
+ // model differently, you can do that on your deleted Turbo Stream view.
22
+
23
+ if (! $model->exists || (method_exists($model, 'trashed') && $model->trashed())) {
24
return $this->renderModelDeletedStream($model);
25
}
26
0 commit comments