OrderController.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?php
  2. namespace App\Http\Controllers;
  3. use App\Models\Brigadier;
  4. use App\Models\Dictionary\Area;
  5. use App\Models\Dictionary\District;
  6. use App\Models\ObjectType;
  7. use App\Models\OrderStatus;
  8. use Illuminate\Http\Request;
  9. class OrderController extends Controller
  10. {
  11. protected array $data = [
  12. 'active' => 'orders',
  13. 'title' => 'Заказы',
  14. 'id' => 'orders',
  15. // 'header' => [
  16. // 'id' => 'ID',
  17. // 'year' => 'Год',
  18. // 'nomenclature_number' => 'Номер номенклатуры',
  19. // 'article' => 'Артикул',
  20. // 'manufacturer' => 'Производитель',
  21. // 'name_tz' => 'Наименование ТЗ',
  22. // 'type_tz' => 'Тип по ТЗ',
  23. // 'type' => 'Тип',
  24. // 'manufacturer_name' => 'Наименование производителя',
  25. // 'sizes' => 'Размеры',
  26. // 'price_status' => 'Статус цены',
  27. // 'product_price_txt' => 'Цена товара',
  28. // 'installation_price_txt' => 'Цена установки',
  29. // 'service_price_txt' => 'Цена обслуживания',
  30. // 'total_price_txt' => 'Итоговая цена',
  31. // 'note' => 'Примечания',
  32. // 'created_at' => 'Дата создания',
  33. // ]
  34. ];
  35. /**
  36. * Display a listing of the resource.
  37. */
  38. public function index()
  39. {
  40. return view('orders.index', $this->data);
  41. }
  42. /**
  43. * Show the form for creating a new resource.
  44. */
  45. public function create()
  46. {
  47. $this->data['districts'] = District::query()->get()->pluck('name', 'id');
  48. $this->data['areas'] = Area::query()->get()->pluck('name', 'id');
  49. $this->data['objectTypes'] = ObjectType::query()->get()->pluck('name', 'id');
  50. $this->data['orderStatuses'] =OrderStatus::query()->get()->pluck('name', 'id');
  51. $this->data['brigadiers'] = Brigadier::query()->get()->pluck('name', 'id');
  52. return view('orders.edit', $this->data);
  53. }
  54. /**
  55. * Store a newly created resource in storage.
  56. */
  57. public function store(Request $request)
  58. {
  59. //
  60. }
  61. /**
  62. * Display the specified resource.
  63. */
  64. public function show(string $id)
  65. {
  66. //
  67. }
  68. /**
  69. * Show the form for editing the specified resource.
  70. */
  71. public function edit(string $id)
  72. {
  73. //
  74. }
  75. /**
  76. * Update the specified resource in storage.
  77. */
  78. public function update(Request $request, string $id)
  79. {
  80. //
  81. }
  82. /**
  83. * Remove the specified resource from storage.
  84. */
  85. public function destroy(string $id)
  86. {
  87. //
  88. }
  89. }