group(function () { Route::get('brand/form/{element}', 'BrandAPIController@form'); Route::resource('brand', 'BrandAPIController'); }); // Public routes for brand Route::get('brands/', 'BrandPublicController@index'); Route::get('brands/{slug?}', 'BrandPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for brands Route::prefix('{guard}/brand')->group(function () { Route::get('brand/form/{element}', 'BrandAPIController@form'); Route::apiResource('brand', 'BrandAPIController'); }); // Public routes for brands Route::get('brand/Brand', 'BrandPublicController@getBrand'); } ); }