group(function () { Route::get('operation/form/{element}', 'OperationAPIController@form'); Route::resource('operation', 'OperationAPIController'); }); // Public routes for operation Route::get('operations/', 'OperationPublicController@index'); Route::get('operations/{slug?}', 'OperationPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for operations Route::prefix('{guard}/operation')->group(function () { Route::get('operation/form/{element}', 'OperationAPIController@form'); Route::apiResource('operation', 'OperationAPIController'); }); // Public routes for operations Route::get('operation/Operation', 'OperationPublicController@getOperation'); } ); }