Skip to content

(docs) ORM: soft deletes via #[SoftDeletes] - #105

Merged
techmahedy merged 1 commit into
doppar:4.xfrom
abdulmajidcse:docs/soft-deletes
Oct 9, 2026
Merged

techmahedy merged 1 commit into
doppar:4.xfrom
abdulmajidcse:docs/soft-deletes

Conversation

@abdulmajidcse

Copy link
Copy Markdown
Member

Docs for doppar/framework#354 (soft deletes via #[SoftDeletes]).

Changes

New page: versions/4.x/soft-deletes.md

  • Marking a model with #[SoftDeletes] / #[SoftDeletes(column: 'removed_at')]
  • Preparing the table with softDeletes(), softDeletesTz() and dropSoftDeletes()
  • Soft deleting via delete(), bulk delete() and purge()
  • Querying with withTrashed(), onlyTrashed() and withoutTrashed(); OR conditions cannot bypass the constraint
  • Restoring (restore()) and permanently deleting (forceDelete()) on models and queries
  • Relationships: eager/lazy loading and present(), absent(), ifExists(), whereLinked() skip trashed rows, with withTrashed() / onlyTrashed() inside the callback
  • Hooks, Temporal ORM integration, utility methods, driver support and important notes

Updated pages

  • hooks.md: before_restored / after_restored events, delete hooks on soft and force deletes, skipping hooks on restore
  • temporal-orm.md: restored history action, time travel and restoreTo() on soft-deletable models
  • entity-orm.md, migrations.md: links to the new page

Note

The new page needs a "Soft Deletes" entry in the site navigation, which is not part of this repo.

- New Soft Deletes page: enabling the attribute, migration columns, deleting,
  querying (withTrashed, onlyTrashed, withoutTrashed), restoring, force deleting,
  relationships, hooks, Temporal ORM integration and utility methods
- Hooks: before_restored / after_restored events; delete hooks fire on soft and
  force deletes
- Temporal ORM: 'restored' history action and restoreTo() with soft deletes
- Entity ORM and Migrations: link to the new page
@techmahedy

Copy link
Copy Markdown
Member

@abdulmajidcse thanks for following doppar convetion for writing docs

@techmahedy
techmahedy merged commit af7b90e into doppar:4.x Oct 9, 2026
@abdulmajidcse
abdulmajidcse deleted the docs/soft-deletes branch October 9, 2026 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants