You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.
I know this has been discussed on the laravel/framework before here and a PR was sent here (which I personally think was too much change when you could have just changed the return value from only to except).
I wanted to bring this up because of something @taylorotwell said on the PR: "Just use Route::resource if you are going to limit the methods anyways."
I get that we could use just the regular Route::resource but at the same time could the apiResource function (here) just be changed from...
Doing it this way will allow us to override only and except without having any overlap, unless of course you wanted create or edit in which case you should use the regular resource as that defeats the purpose. I want to use apiResource in my API routes to help keep up with the consistency of how I use it. I just don't need the update method and it seems kind of strange that I can't just pass it as an except option.
I would like to here some thoughts on this as well as any issues that could occur with this. The only "issue" I could think of is if the resource controller was updated with a new displaying method of some sort...then we would have to update the function...but that could also happen with it's current state so it doesn't matter too much either way.
The text was updated successfully, but these errors were encountered:
I know this has been discussed on the laravel/framework before here and a PR was sent here (which I personally think was too much change when you could have just changed the return value from
only
toexcept
).I wanted to bring this up because of something @taylorotwell said on the PR:
"Just use Route::resource if you are going to limit the methods anyways."
I get that we could use just the regular
Route::resource
but at the same time could theapiResource
function (here) just be changed from...to
Doing it this way will allow us to override
only
andexcept
without having any overlap, unless of course you wanted create or edit in which case you should use the regular resource as that defeats the purpose. I want to useapiResource
in my API routes to help keep up with the consistency of how I use it. I just don't need theupdate
method and it seems kind of strange that I can't just pass it as anexcept
option.I would like to here some thoughts on this as well as any issues that could occur with this. The only "issue" I could think of is if the resource controller was updated with a new displaying method of some sort...then we would have to update the function...but that could also happen with it's current state so it doesn't matter too much either way.
The text was updated successfully, but these errors were encountered: