group(function () { Route::get('voucher/form/{element}', 'VoucherAPIController@form'); Route::resource('voucher', 'VoucherAPIController'); }); // Public routes for voucher Route::get('vouchers/', 'VoucherPublicController@index'); Route::get('vouchers/{slug?}', 'VoucherPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for vouchers Route::prefix('{guard}/voucher')->group(function () { Route::get('voucher/form/{element}', 'VoucherAPIController@form'); Route::apiResource('voucher', 'VoucherAPIController'); }); // Public routes for vouchers Route::get('voucher/Voucher', 'VoucherPublicController@getVoucher'); } ); }