Skip to content

[Feature Request] Add support for SoftDeletes models #668

Description

@lostgeek

Description

Laravel has a SoftDeletes trait that enables models to be soft deleted. That means they will not appear in queries unless specifically queried with $query->withTrashed().

Using scopeRunwayListing it is possible to have soft-deleted entries to appear on the Runway listing, but when you try to edit a soft-deleted entry, you get a 404.

As base support it would already be great, if you could mark a Runway resource as softdeletable in the config, so that it is listed and fetched using withTrashed(). Ideally there would be an in-built way to display the deletion state to the user.

Steps to reproduce

  1. Create a Model with the SoftDeletes trait
  2. Delete an entry
  3. Try to edit it via Runway

Environment

Environment
Application Name: imail
Laravel Version: 10.48.25
PHP Version: 8.3.15
Composer Version: 2.8.1
Environment: local
Debug Mode: ENABLED
URL: imail-cms.novu.io
Maintenance Mode: OFF

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: redis
Database: pgsql
Logs: stack / daily, sentry
Mail: mailgun
Queue: redis
Session: redis

Sentry
Enabled: MISSING DSN
Environment: local
Laravel SDK Version: 4.10.1
PHP SDK Version: 4.10.0
Release: 50900a4
Sample Rate Errors: 100%
Sample Rate Performance Monitoring: 1%
Sample Rate Profiling: 1%
Send Default PII: ENABLED

Statamic
Addons: 2
Sites: 2 (🇩🇪 Deutsch, 🇫🇷 Français)
Stache Watcher: Disabled
Static Caching: Disabled
Version: 5.42.0.1 PRO

Statamic Addons
statamic-rad-pack/runway: 7.13.2
teamnovu/localize: 1.1.3

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions