Skip to content

[5.4] Add apiResource function to Router - #19347

Merged
taylorotwell merged 3 commits into
laravel:5.4from
Prepager:patch-1
May 27, 2017
Merged

[5.4] Add apiResource function to Router#19347
taylorotwell merged 3 commits into
laravel:5.4from
Prepager:patch-1

Conversation

@Prepager

Copy link
Copy Markdown
Contributor

The route resource function is very useful but an API doesn't need the create and edit routes. This pull request would allow that functionality with a new apiResource function that would work the same way as the original resource function just without the two unnecessary routes.

Route::apiResource('photos', 'PhotoController');

@tillkruss

tillkruss commented May 26, 2017

Copy link
Copy Markdown
Contributor

Why not add that as macro in your project?

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.

3 participants