web.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. <?php
  2. use Illuminate\Support\Facades\Route;
  3. use AkkiIo\LaravelGoogleAnalytics\Facades\LaravelGoogleAnalytics;
  4. use AkkiIo\LaravelGoogleAnalytics\Period;
  5. use Themes\Pro\nawame\app\Http\Controllers\Auth\CompanySignupController;
  6. use Themes\Pro\nawame\app\Http\Controllers\Auth\FindMemberIdController;
  7. use Themes\Pro\nawame\app\Http\Controllers\Auth\FindMemberIdVerifyController;
  8. use Themes\Pro\nawame\app\Http\Controllers\Auth\FindMemberPwVerifyController;
  9. use Themes\Pro\nawame\app\Http\Controllers\Auth\FindMemberPwVerifyinputController;
  10. use Themes\Pro\nawame\app\Http\Controllers\Auth\MemberWithdrawalController;
  11. use Themes\Pro\nawame\app\Http\Controllers\Auth\PasswordChangeController;
  12. use Themes\Pro\nawame\app\Http\Controllers\EFinanceController;
  13. use Themes\Pro\nawame\app\Http\Controllers\Etc\OneToOneController;
  14. use Themes\Pro\nawame\app\Http\Controllers\IndexController;
  15. use Themes\Pro\nawame\app\Http\Controllers\Auth\LoginController;
  16. use Themes\Pro\nawame\app\Http\Controllers\Auth\MemberSignupVerifyController;
  17. use Themes\Pro\nawame\app\Http\Controllers\Auth\SignupController;
  18. use Themes\Pro\nawame\app\Http\Controllers\MyPage\EventController;
  19. use Themes\Pro\nawame\app\Http\Controllers\MyPage\MemberEditController;
  20. use Themes\Pro\nawame\app\Http\Controllers\MyPage\NoticeController;
  21. use Themes\Pro\nawame\app\Http\Controllers\MyPage\OrderController;
  22. use Themes\Pro\nawame\app\Http\Controllers\MyPage\QnaController;
  23. use Themes\Pro\nawame\app\Http\Controllers\PolicyController;
  24. use Themes\Pro\nawame\app\Http\Controllers\PrivacyController;
  25. use Themes\Pro\nawame\app\Http\Controllers\RefundController;
  26. use Themes\Pro\nawame\app\Http\Controllers\Shop\AddressAddController;
  27. use Themes\Pro\nawame\app\Http\Controllers\Shop\CartController;
  28. use Themes\Pro\nawame\app\Http\Controllers\Shop\CheckoutController;
  29. use Themes\Pro\nawame\app\Http\Controllers\Shop\CheckoutOkController;
  30. use Themes\Pro\nawame\app\Http\Controllers\Shop\ContactAddController;
  31. use Themes\Pro\nawame\app\Http\Controllers\Shop\ItemController;
  32. use Themes\Pro\nawame\app\Http\Controllers\Shop\WalletAddController;
  33. use Themes\Pro\nawame\app\Http\Controllers\Shop\WalletBalanceController;
  34. use Themes\Pro\nawame\app\Http\Controllers\Shop\WalletSendController;
  35. use Themes\Pro\nawame\app\Http\Controllers\Shop\WishController;
  36. Route::get('/test', function () {
  37. // build a query using the `get()` method
  38. $listType1Book = app(App\Services\CallApiService::class)->callApi([
  39. 'url' => 'list-type1-book',
  40. 'data' => [
  41. 'Book' => [
  42. [
  43. 'QueryVars' => [
  44. 'QueryName' => 'pro:shop/cart',
  45. 'SubSimpleFilter' => "image_type = 'thumb'",
  46. 'IsntPagination' => true,
  47. ],
  48. 'PageVars' => [
  49. 'Limit' => 100000
  50. ]
  51. ]
  52. ]
  53. ]
  54. ]);
  55. if (app(App\Services\CallApiService::class)->verifyApiError($listType1Book)) {
  56. notify()->error($listType1Book['body'], 'Error', 'bottomRight');
  57. return redirect()->back();
  58. }
  59. return view('views.test', compact('listType1Book'));
  60. // $a = LaravelGoogleAnalytics::getTotalUsers(Period::days(1));
  61. // dd($a);
  62. });
  63. Route::middleware(['check.device.scale', 'check.gate.token', 'header.data'])->group(function () {
  64. Route::get('/', [IndexController::class, 'index'])->name('index');
  65. Route::get('/item-list', function() {
  66. return view('views.shop.item-list');
  67. })->name('item-list');
  68. Route::get('/item-gallery/{igroupCode}', [ItemController::class, 'index'])->name('item-gallery');
  69. Route::get('/item-details/{id}', [ItemController::class, 'show'])->name('item-details');
  70. Route::get('/credit-item-list', function () {
  71. return view('views.shop.credit-item-list');
  72. })->name('credit-item-list');
  73. Route::get('/credit-item-detail', function () {
  74. return view('views.shop.credit-item-detail');
  75. })->name('credit-item-detail');
  76. // Route::get('/cart', function() {
  77. // return view('views.shop.cart');
  78. // })->name('cart');
  79. Route::prefix('my-page')->name('my-page.')->group(function () {
  80. Route::get('/notice-list', [NoticeController::class, 'list'])->name('notice.list');
  81. Route::get('/notice-details/{id}', [NoticeController::class, 'show'])->name('notice.show');
  82. Route::get('/ticket-list', function () {
  83. return view('views.my-page.ticket-list');
  84. })->name('ticket-list');
  85. Route::get('/credit-io-list', function () {
  86. return view('views.my-page.credit-io-list');
  87. })->name('credit-io-list');
  88. Route::get('/event-list', [EventController::class, 'list'])->name('event.list');
  89. Route::get('/event-details/{id}', [EventController::class, 'show'])->name('event.show');
  90. Route::get('/qna-list', function () {
  91. return view('views.my-page.qna-list');
  92. })->name('qna-list');
  93. });
  94. Route::get('/policy-list', [PolicyController::class, 'index'])->name('policy.index');
  95. Route::get('/policy-detail/{unique}', [PolicyController::class, 'show'])->name('policy.show');
  96. Route::get('/privacy-list', [PrivacyController::class, 'index'])->name('privacy.index');
  97. Route::get('/privacy-detail/{unique}', [PrivacyController::class, 'show'])->name('privacy.show');
  98. Route::get('/e-finance-list', [EFinanceController::class, 'index'])->name('e-finance.index');
  99. Route::get('/e-finance-detail/{unique}', [EFinanceController::class, 'show'])->name('e-finance.show');
  100. Route::get('/refund-list', [RefundController::class, 'index'])->name('refund.index');
  101. Route::get('/refund-detail/{unique}', [RefundController::class, 'show'])->name('refund.show');
  102. Route::get('/member-go-email', function() {
  103. return view('views.auth.member-go-email');
  104. })->name('member-go-email');
  105. Route::get('/member-signup', [SignupController::class, 'index'])->name('member-signup.index');
  106. Route::post('/member-signup', [SignupController::class, 'store'])->name('member-signup.store');
  107. Route::get('/confirm', [SignupController::class, 'confirm'])->name('confirm');
  108. Route::get('/member-verify-ok', function() {
  109. return view('views.auth.member-verify-ok');
  110. })->name('member-verify-ok');
  111. Route::get('/member-verify-resend', function() {
  112. return view('views.auth.member-verify-resend');
  113. })->name('member-verify-resend');
  114. Route::post('/member-verify-resend', [SignupController::class, 'activateCodeResend'])->name('member-verify-resend');
  115. Route::get('/password-reset', function() {
  116. return view('views.auth.password-reset');
  117. })->name('password-reset');
  118. Route::get('/member-withdraw-cancel', function() {
  119. return view('views.auth.member-withdraw-cancel');
  120. })->name('member-withdraw-cancel');
  121. Route::get('/member-sso-login', function() {
  122. return view('views.auth.member-sso-login');
  123. })->name('member-sso-login');
  124. Route::get('/member-signup-agree', function() {
  125. return view('views.auth.member-signup-agree');
  126. })->name('member-signup-agree');
  127. Route::get('/member-company-signup', [CompanySignupController::class, 'index'])->name('member-company-signup.index');
  128. Route::post('/member-company-signup', [CompanySignupController::class, 'store'])->name('member-company-signup.store');
  129. Route::get('/member-signup-branch', function() {
  130. return view('views.auth.member-signup-branch');
  131. })->name('member-signup-branch');
  132. Route::get('/member-signup-verify', [MemberSignupVerifyController::class, 'index'])->name('member-signup-verify.index');
  133. Route::post('/member-signup-verify', [MemberSignupVerifyController::class, 'store'])->name('member-signup-verify.store');
  134. Route::post('/member-signup-verify-send', [MemberSignupVerifyController::class, 'sendCert'])->name('member-signup-verify.send');
  135. Route::get('/member-activate-failed', function() {
  136. return view('views.auth.member-activate-failed');
  137. })->name('member-activate-failed');
  138. Route::get('/password-reset-code-failed', function() {
  139. return view('views.auth.password-reset-code-failed');
  140. })->name('password-reset-code-failed');
  141. Route::get('/find-member-id-verify', [FindMemberIdVerifyController:: class, 'index'])->name('find-member-id-verify.index');
  142. Route::post('/find-member-id-verify', [FindMemberIdVerifyController:: class, 'store'])->name('find-member-id-verify.store');
  143. Route::get('/find-member-id', [FindMemberIdController::class, 'index'])->name('find-member-id.index');
  144. Route::get('/find-member-pw-memcheck', function() {
  145. return view('views.auth.find-member-pw-memcheck');
  146. })->name('find-member-pw-memcheck.index');
  147. Route::get('/find-member-pw-verify', [FindMemberPwVerifyController::class, 'index'])->name('find-member-pw-verify.index');
  148. Route::post('/find-member-pw-verify', [FindMemberPwVerifyController::class, 'store'])->name('find-member-pw-verify.store');
  149. Route::get('/find-member-pw-verifyinput', [FindMemberPwVerifyinputController::class, 'emailVerifyinput'])->name('find-member-pw-verifyinput');
  150. Route::get('/paq', [QnaController::class, 'list'])->name('paq');
  151. Route::get('/contact-us', function() {
  152. return view('views.etc.contact-us');
  153. })->name('contact-us');
  154. Route::get('/password-change', [PasswordChangeController::class, 'index'])->name('password-change.index');
  155. Route::post('/password-change', [PasswordChangeController::class, 'store'])->name('password-change.store');
  156. Route::get('/member-login-broker', function () {
  157. session()->put('url.intended', url()->previous());
  158. return redirect()->route('member-login');
  159. });
  160. Route::middleware('check.pro.member')->group(function () {
  161. Route::get('/member-withdrawal', [MemberWithdrawalController::class, 'index'])->name('member-withdrawal.index');
  162. Route::post('/member-withdrawal', [MemberWithdrawalController::class, 'store'])->name('member-withdrawal.store');
  163. Route::post('/cart', [CartController::class, 'store'])->name('cart.store');
  164. Route::get('/wish-list', [WishController::class, 'index'])->name('wish-list.index');
  165. Route::post('/wish-list', [WishController::class, 'favorite'])->name('wish-list.favorite');
  166. Route::delete('/wish-list', [WishController::class, 'destroy'])->name('wish-list.destroy');
  167. Route::get('/checkout', [CheckOutCOntroller::class, 'index'])->name('checkout.index');
  168. Route::post('/checkout', [CheckOutCOntroller::class, 'store'])->name('checkout.store');
  169. Route::get('/checkout-ok', [CheckoutOkController::class, 'index'])->name('checkout-ok');
  170. Route::get('/checkout-failed', function() {
  171. return view('views.shop.checkout-failed');
  172. })->name('checkout-failed');
  173. Route::prefix('my-page')->name('my-page.')->group(function () {
  174. Route::get('/member-edit', [MemberEditController::class, 'index'])->name('member-edit.index');
  175. Route::get('/member-edit/{id}', [MemberEditController::class, 'show'])->name('member-edit.show');
  176. Route::post('/member-edit/{id}', [MemberEditController::class, 'update'])->name('member-edit.update');
  177. Route::get('/order-list', [OrderController::class, 'list'])->name('order-list');
  178. });
  179. Route::post('/wallet-add', [WalletAddController::class, 'store'])->name('wallet.store');
  180. Route::get('/contact-add', [ContactAddController::class, 'index'])->name('contact.index');
  181. Route::post('/contact-add', [ContactAddController::class, 'store'])->name('contact.store');
  182. Route::get('/contact-add/{id}', [ContactAddController::class, 'show'])->name('contact.show');
  183. Route::post('/contact-add/{id}', [ContactAddController::class, 'update'])->name('contact.update');
  184. Route::delete('/contact-add/{id}', [ContactAddController::class, 'destroy'])->name('contact.destroy');
  185. Route::get('/address-add', [AddressAddController::class, 'index'])->name('address.index');
  186. Route::post('/address-add', [AddressAddController::class, 'store'])->name('address.store');
  187. Route::get('/address-add/{id}', [AddressAddController::class, 'show'])->name('address.show');
  188. Route::post('/address-add/{id}', [AddressAddController::class, 'update'])->name('address.update');
  189. Route::delete('/address-add/{id}', [AddressAddController::class, 'destroy'])->name('address.destroy');
  190. Route::get('/wallet-balance', [WalletBalanceController::class, 'index'])->name('wallet-balance.index');
  191. Route::post('/wallet-balance', [WalletBalanceController::class, 'result'])->name('wallet-balance.result');
  192. Route::get('/wallet-send', [WalletSendController::class, 'index'])->name('wallet-send.index');
  193. Route::post('/wallet-send', [WalletSendController::class, 'result'])->name('wallet-send.result');
  194. Route::get('/1to1-list', [OneToOneController::class, 'list'])->name('1to1.list');
  195. Route::get('/1to1-details/{id}', [OneToOneController::class, 'show'])->name('1to1.show');
  196. Route::get('/1to1-form', function() {
  197. return view('views.etc.1to1-form');
  198. })->name('1to1.form');
  199. Route::post('/1to1-form', [OneToOneController::class, 'store'])->name('1to1.store');
  200. });
  201. Route::group(['middleware' => 'check.pro.guest'], function () {
  202. Route::get('/member-login', [LoginController::class, 'index'])->name('member-login');
  203. });
  204. Route::post('/member-login', [LoginController::class, 'store'])->name('member-login.store');
  205. });
  206. Route::get('/member-logout', function() {
  207. session()->forget('member');
  208. session()->forget('GateToken');
  209. session()->forget('locale');
  210. session()->forget('wallet');
  211. return redirect()->to('/');
  212. })->name('member-logout');