group(function () { Route::get('contacts/form/{element}', 'ContactsAPIController@form'); Route::resource('contacts', 'ContactsAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for contacts Route::prefix('{guard}/contact')->group(function () { Route::get('contacts/form/{element}', 'ContactsAPIController@form'); Route::apiResource('contacts', 'ContactsAPIController'); }); // Public routes for contacts Route::get('contact/Contacts', 'ContactsPublicController@getContacts'); } ); }