Resource routes for soft-deleted models (softResource & softApiResource) #1428
Closed
SaadMajeed565
started this conversation in
Ideas
Replies: 1 comment
-
|
i mistaken put this ticket here. i had to put it in laravel side. sorry for that |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, we have Route::resource() and Route::apiResource() which save time and help keep web.php or api.php clean.
I propose adding two new helper functions: softResource() and softApiResource(). These would automatically generate routes for soft-deleted models, including:
This would eliminate the need to define these routes manually. Often developers add these routes under show() or other routes, which can break RESTful URL conventions.
Having built-in support for soft-delete resource routes would make working with soft-deleted models more consistent and cleaner.
Beta Was this translation helpful? Give feedback.
All reactions