group(function () { Route::get('toppartner/form/{element}', 'ToppartnerAPIController@form'); Route::resource('toppartner', 'ToppartnerAPIController'); }); // Public routes for toppartner Route::get('toppartners/', 'ToppartnerPublicController@index'); Route::get('toppartners/{slug?}', 'ToppartnerPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for toppartners Route::prefix('{guard}/toppartner')->group(function () { Route::get('toppartner/form/{element}', 'ToppartnerAPIController@form'); Route::apiResource('toppartner', 'ToppartnerAPIController'); }); // Public routes for toppartners Route::get('toppartner/Toppartner', 'ToppartnerPublicController@getToppartner'); } ); }