group(function () { Route::get('company/form/{element}', 'CompanyAPIController@form'); Route::resource('company', 'CompanyAPIController'); }); // Public routes for company Route::get('companies/', 'CompanyPublicController@index'); Route::get('companies/{slug?}', 'CompanyPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for companies Route::prefix('{guard}/company')->group(function () { Route::get('company/form/{element}', 'CompanyAPIController@form'); Route::apiResource('company', 'CompanyAPIController'); }); // Public routes for companies Route::get('company/Company', 'CompanyPublicController@getCompany'); } ); }