group(function () { Route::get('statistics/form/{element}', 'StatisticsAPIController@form'); Route::resource('statistics', 'StatisticsAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for statistics Route::prefix('{guard}/statistic')->group(function () { Route::get('statistics/form/{element}', 'StatisticsAPIController@form'); Route::apiResource('statistics', 'StatisticsAPIController'); }); // Public routes for statistics Route::get('statistic/Statistics', 'StatisticsPublicController@getStatistics'); } ); }