group(function () { Route::get('table/form/{element}', 'TableAPIController@form'); Route::resource('table', 'TableAPIController'); }); // Public routes for table Route::get('tables/', 'TablePublicController@index'); Route::get('tables/{slug?}', 'TablePublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for tables Route::prefix('{guard}/table')->group(function () { Route::get('table/form/{element}', 'TableAPIController@form'); Route::apiResource('table', 'TableAPIController'); }); // Public routes for tables Route::get('table/Table', 'TablePublicController@getTable'); } ); }