sjorsvanleeuwen/route-resource-extension

Resource extension to allow softDeletes

v1.0 2021-05-15 20:48 UTC

This package is auto-updated.

Last update: 2024-10-16 04:38:14 UTC


README

This package attempts to help with building routes for models with softdeletes.

It adds a macro to extend the existing routes and build some other routes on top of it for restoring, and an index of trashed models.

Pull in the package:

composer require sjorsvanleeuwen/route-resource-extension

Next, open your route file and modify a resource route like so:

Route::resource('myresource', MyResourceController::class)->withSoftDeletes();

Next to the normal routes this will create the following routes: