delivery_boy.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | POS 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\DeliveryBoyController;
  14. use App\Http\Controllers\OrderController;
  15. Route::group(['prefix' =>'admin', 'middleware' => ['auth', 'admin']], function(){
  16. //Delivery Boy
  17. Route::resource('delivery-boys', DeliveryBoyController::class);
  18. Route::controller(DeliveryBoyController::class)->group(function () {
  19. Route::get('/delivery-boy/ban/{id}', 'ban')->name('delivery-boy.ban');
  20. Route::get('/delivery-boy-configuration', 'delivery_boy_configure')->name('delivery-boy-configuration');
  21. Route::post('/delivery-boy/order-collection', 'order_collection_form')->name('delivery-boy.order-collection');
  22. Route::post('/collection-from-delivery-boy', 'collection_from_delivery_boy')->name('collection-from-delivery-boy');
  23. Route::post('/delivery-boy/delivery-earning', 'delivery_earning_form')->name('delivery-boy.delivery-earning');
  24. Route::post('/paid-to-delivery-boy', 'paid_to_delivery_boy')->name('paid-to-delivery-boy');
  25. Route::get('/delivery-boys-payment-histories', 'delivery_boys_payment_histories')->name('delivery-boys-payment-histories');
  26. Route::get('/delivery-boys-collection-histories', 'delivery_boys_collection_histories')->name('delivery-boys-collection-histories');
  27. Route::get('/delivery-boy/cancel-request', 'cancel_request_list')->name('delivery-boy.cancel-request');
  28. });
  29. });
  30. Route::group(['middleware' => ['user', 'verified', 'unbanned']], function() {
  31. Route::controller(DeliveryBoyController::class)->group(function () {
  32. Route::get('/assigned-deliveries', 'assigned_delivery')->name('assigned-deliveries');
  33. Route::get('/pickup-deliveries', 'pickup_delivery')->name('pickup-deliveries');
  34. Route::get('/on-the-way-deliveries', 'on_the_way_deliveries')->name('on-the-way-deliveries');
  35. Route::get('/completed-deliveries', 'completed_delivery')->name('completed-deliveries');
  36. Route::get('/pending-deliveries', 'pending_delivery')->name('pending-deliveries');
  37. Route::get('/cancelled-deliveries', 'cancelled_delivery')->name('cancelled-deliveries');
  38. Route::get('/total-collections', 'total_collection')->name('total-collection');
  39. Route::get('/total-earnings', 'total_earning')->name('total-earnings');
  40. Route::get('/cancel-request/{id}', 'cancel_request')->name('cancel-request');
  41. Route::get('/cancel-request-list', 'cancel_request_list')->name('cancel-request-list');
  42. });
  43. Route::controller(OrderController::class)->group(function () {
  44. Route::post('/orders/update_delivery_status', 'update_delivery_status')->name('delivery-boy.orders.update_delivery_status');
  45. });
  46. Route::controller(DeliveryBoyController::class)->group(function () {
  47. Route::get('/delivery-boy/order-detail/{id}', 'order_detail')->name('delivery-boy.order-detail');
  48. });
  49. });