Skip to content

Make useRestConvention a chaining method #23

Description

@gabbanaesteban

Is your feature request related to a problem? Please describe.
If I want to create a get route using rest convention, I have to:

Long way:

Route::get('book-insights')->controller('BookInsightController');
Route::get('book-insights/{id}')->controller('BookInsightController')->action('getById');

Shorter way:

Route::add('book-insights')->controller('BookInsightController')->via(Http::GET);

Describe the solution you'd like

Ability to set wheter use restConvention or not as a chaining method

Route::get('book-insights')->controller('BookInsightController')->restConvention(true);

Describe alternatives you've considered
None

Additional context
The "Shorter way" isn't an official solution, it wasn't planned to work like that, it was just luck.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions