Skip to content

Commit a1bea3c

Browse files
Pluralize module route base path
1 parent ac6928a commit a1bea3c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Commands/stubs/routes/api.stub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ use Illuminate\Support\Facades\Route;
44
use $MODULE_NAMESPACE$\$STUDLY_NAME$\$CONTROLLER_NAMESPACE$\$STUDLY_NAME$Controller;
55

66
Route::middleware(['auth:sanctum'])->prefix('v1')->group(function () {
7-
Route::apiResource('$LOWER_NAME$', $STUDLY_NAME$Controller::class)->names('$LOWER_NAME$');
7+
Route::apiResource('$PLURAL_LOWER_NAME$', $STUDLY_NAME$Controller::class)->names('$LOWER_NAME$');
88
});

src/Commands/stubs/routes/web.stub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ use Illuminate\Support\Facades\Route;
44
use $MODULE_NAMESPACE$\$STUDLY_NAME$\$CONTROLLER_NAMESPACE$\$STUDLY_NAME$Controller;
55

66
Route::middleware(['auth', 'verified'])->group(function () {
7-
Route::resource('$LOWER_NAME$', $STUDLY_NAME$Controller::class)->names('$LOWER_NAME$');
7+
Route::resource('$PLURAL_LOWER_NAME$', $STUDLY_NAME$Controller::class)->names('$LOWER_NAME$');
88
});

0 commit comments

Comments
 (0)