| 12345678910111213141516171819202122232425262728 |
- <?php
- namespace App\Http\Controllers;
- use App\Services\SparePartInventoryService;
- use Illuminate\Http\Request;
- class SparePartInventoryController extends Controller
- {
- protected array $data = [
- 'active' => 'spare_parts',
- 'title' => 'Контроль наличия запчастей',
- 'id' => 'spare_part_inventory',
- ];
- public function __construct(protected SparePartInventoryService $inventoryService)
- {
- }
- public function index(Request $request)
- {
- $this->data['critical_shortages'] = $this->inventoryService->getCriticalShortages();
- $this->data['below_min_stock'] = $this->inventoryService->getBelowMinStock();
- $this->data['tab'] = 'inventory';
- return view('spare_parts.index', $this->data);
- }
- }
|