affiliate.php 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | Affiliate Routes
  5. |--------------------------------------------------------------------------
  6. |
  7. | Here is where you can register admin routes for your application. These
  8. | routes are loaded by the RouteServiceProvider within a group which
  9. | contains the "web" middleware group. Now create something great!
  10. |
  11. */
  12. //Admin
  13. use App\Http\Controllers\AffiliateController;
  14. Route::group(['prefix' =>'admin', 'middleware' => ['auth', 'admin']], function(){
  15. Route::controller(AffiliateController::class)->group(function () {
  16. Route::get('/affiliate', 'index')->name('affiliate.index');
  17. Route::post('/affiliate/affiliate_option_store', 'affiliate_option_store')->name('affiliate.store');
  18. Route::get('/affiliate/configs', 'configs')->name('affiliate.configs');
  19. Route::post('/affiliate/configs/store', 'config_store')->name('affiliate.configs.store');
  20. Route::get('/affiliate/users', 'users')->name('affiliate.users');
  21. Route::get('/affiliate/verification/{id}', 'show_verification_request')->name('affiliate_users.show_verification_request');
  22. Route::get('/affiliate/approve/{id}', 'approve_user')->name('affiliate_user.approve');
  23. Route::get('/affiliate/reject/{id}', 'reject_user')->name('affiliate_user.reject');
  24. Route::post('/affiliate/approved', 'updateApproved')->name('affiliate_user.approved');
  25. Route::post('/affiliate/payment_modal', 'payment_modal')->name('affiliate_user.payment_modal');
  26. Route::post('/affiliate/pay/store', 'payment_store')->name('affiliate_user.payment_store');
  27. Route::get('/affiliate/payments/show/{id}', 'payment_history')->name('affiliate_user.payment_history');
  28. Route::get('/refferal/users', 'refferal_users')->name('refferals.users');
  29. // Affiliate Withdraw Request
  30. Route::get('/affiliate/withdraw_requests', 'affiliate_withdraw_requests')->name('affiliate.withdraw_requests');
  31. Route::post('/affiliate/affiliate_withdraw_modal', 'affiliate_withdraw_modal')->name('affiliate_withdraw_modal');
  32. Route::post('/affiliate/withdraw_request/payment_store', 'withdraw_request_payment_store')->name('withdraw_request.payment_store');
  33. Route::get('/affiliate/withdraw_request/reject/{id}', 'reject_withdraw_request')->name('affiliate.withdraw_request.reject');
  34. Route::get('/affiliate/logs', 'affiliate_logs_admin')->name('affiliate.logs.admin');
  35. Route::post('/affiliate/commission', 'commission')->name('affiliate.commission');
  36. Route::post('/affiliate/commissionpeople', 'commissionpeople')->name('affiliate.commissionpeople');
  37. Route::post('/affiliate/commissionrecharge', 'commissionrecharge')->name('affiliate.commissionrecharge');
  38. Route::post('/affiliate/commissionstore', 'commissionstore')->name('affiliate.commissionstore');
  39. Route::post('/affiliate/commissiontrain', 'commissiontrain')->name('affiliate.commissiontrain');
  40. });
  41. });
  42. Route::group(['prefix' =>'seller', 'middleware' => ['auth', 'seller'], 'as' => 'seller.'], function(){
  43. Route::controller(AffiliateController::class)->group(function () {
  44. Route::get('/affiliate', 'seller_index')->name('affiliate.index');
  45. });
  46. });
  47. //FrontEnd
  48. Route::controller(AffiliateController::class)->group(function () {
  49. Route::get('/affiliate', 'apply_for_affiliate')->name('affiliate.apply');
  50. Route::post('/affiliate/store', 'store_affiliate_user')->name('affiliate.store_affiliate_user');
  51. });
  52. Route::group(['middleware' => ['auth']], function(){
  53. Route::controller(AffiliateController::class)->group(function () {
  54. Route::get('/affiliate/user', 'user_index')->name('affiliate.user.index');
  55. Route::get('/affiliate/user/payment_history', 'user_payment_history')->name('affiliate.user.payment_history');
  56. Route::get('/affiliate/user/withdraw_request_history', 'user_withdraw_request_history')->name('affiliate.user.withdraw_request_history');
  57. Route::get('/affiliate/payment/settings', 'payment_settings')->name('affiliate.payment_settings');
  58. Route::post('/affiliate/payment/settings/store', 'payment_settings_store')->name('affiliate.payment_settings_store');
  59. // Affiliate Withdraw Request
  60. Route::post('/affiliate/withdraw_request/store', 'withdraw_request_store')->name('affiliate.withdraw_request.store');
  61. });
  62. });