2017 © Pedro Peláez

library laravel-soft-delete

Extend laravel core support for soft delete



Extend laravel core support for soft delete

  • Saturday, February 1, 2014
  • by revati
  • Repository
  • 1 Watchers
  • 3 Stars
  • 16 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown


  • route for restoring resource PUT/PATCH
  • route for force deleting resource DELETE (default delete used as soft delete)
  • route for trashed resources list GET


Begin by installing this package through Composer. Edit your project's composer.json file to require revati/laravel-soft-delete., (*1)

"require": {
    "laravel/framework": "4.1.*",
    "revati/laravel-soft-delete": "dev-master"

Next, update Composer from the Terminal:, (*2)

composer update

Once this operation completes, the final step is to add the service provider. Open app/config/app.php, and add a new item to the providers array., (*3)


That's it! You're all set to go., (*4)

Generated routes

Verb Path Action Route Name
Default routes
GET /resource index resource.index
GET /resource/create create resource.create
POST /resource store resource.store
GET /resource/{resource} show resource.show
GET /resource/{resource}/edit edit resource.edit
PUT/PATCH /resource/{resource} update resource.update
DELETE /resource/{resource} destroy resource.destroy
Additional routes
GET /resource/trash trash resource.trash
PUT/PATCH /resource/{resource}/restore restore resource.restore
GET /resource/{resource}/confirm restore resource.confirmDestroy
DELETE /resource/{resource}/force forceDestroy resource.forceDestroy

The Versions

01/02 2014



Extend laravel core support for soft delete

  Sources   Download

The Requires


by Avatar revati

laravel soft delete routes