laravel-shift/blueprint

Allow plural route naming convention

Closed this issue · 2 comments

Synopsis:

First of all, thank you so much for this amazing package! It saves me a ton of time.

I'm not sure whether this is intentional, but according to Laravel and REST naming conventions, the route URIs should be in plural form.

Refferences:

Proposed Syntax:

Expected Behavior:

Currently, the generated routes are in the singular form. For example:

controllers:
  Post:
    resource: api

Generates:

Route::apiResource('post', App\Http\Controllers\PostController::class);

Instead, it should be:

Route::apiResource('posts', App\Http\Controllers\PostController::class);

I am open to adding a configuration option for generating plural routes, view, etc. However, per the previous PR, this is not a small task. I will leave this open for the community to implement if wanted.

Merged in #574