{Single Action Controllers”的命名约定?

时间:2018-06-25 13:15:48

标签: laravel routes naming-conventions

我正在努力使用“ Single Action Controllers”时应该遵循哪种模式!

当命名这些控制器时,你们会遵循什么? 现在,我正在这样做:

Route::group(['namespace' => 'Controllers\Admin\Permissions'], function () {

    Route::get('/permissions', [
        'uses' => 'ShowListPageController',
        'as' => 'permissions.show.list.page', ]
    );

    Route::get('/permissions/create', [
        'uses' => 'ShowCreatePageController',
        'as' => 'permissions.show.create.page', ]
    );

    Route::post('/permissions', [
        'uses' => 'StoreController',
        'as' => 'permissions.store', ]
    );

});

我觉得它很乱!

命名这些路线的最佳做法是什么?

0 个答案:

没有答案