group(function () { Route::get('phone/form/{element}', 'PhoneAPIController@form'); Route::resource('phone', 'PhoneAPIController'); }); // Public routes for phone Route::get('phones/', 'PhonePublicController@index'); Route::get('phones/{slug?}', 'PhonePublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for phones Route::prefix('{guard}/phone')->group(function () { Route::get('phone/form/{element}', 'PhoneAPIController@form'); Route::apiResource('phone', 'PhoneAPIController'); }); // Public routes for phones Route::get('phone/Phone', 'PhonePublicController@getPhone'); } ); }