group(function () { Route::get('policy/form/{element}', 'PolicyAPIController@form'); Route::resource('policy', 'PolicyAPIController'); }); // Public routes for policy Route::get('policies/', 'PolicyPublicController@index'); Route::get('policies/{slug?}', 'PolicyPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for policies Route::prefix('{guard}/policy')->group(function () { Route::get('policy/form/{element}', 'PolicyAPIController@form'); Route::apiResource('policy', 'PolicyAPIController'); }); // Public routes for policies Route::get('policy/Policy', 'PolicyPublicController@getPolicy'); } ); }