jeudi 29 octobre 2015

Weird named routes with resource route and parameter - Laravel

I have this route resource:

Route::resource('{module_slug}/post', 'Backend\PostController');

That results in routes like:

cms.{module_slug}.post.index

Should I be bothered by {module_slug} in the name?

I prefer something like cms.module.post.index.

I've found that I can rename them with:

'names' => [
        'index' => 'cms.module.post.index'
]

Is this the way to go? When I used:

'as' => 'module.post'

for the resource I get: module.post.cms.{module_slug}.post.index



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire