コード例 #1
0
 /**
  * Displays the form for editing the specified inventory note.
  *
  * @param int|string $id
  * @param int|string $noteId
  *
  * @return \Illuminate\View\View
  */
 public function edit($id, $noteId)
 {
     $item = $this->inventory->find($id);
     $note = $item->notes()->find($noteId);
     if ($note) {
         return view('maintenance::inventory.notes.edit', compact('item', 'note'));
     }
     abort(404);
 }
コード例 #2
0
 /**
  * Displays the form for taking inventory stock
  * and attaching it to the specified work order.
  *
  * @param int|string $workOrderId
  * @param int|string $inventoryId
  * @param int|string $stockId
  *
  * @return \Illuminate\View\View
  */
 public function getTake($workOrderId, $inventoryId, $stockId)
 {
     $workOrder = $this->workOrder->find($workOrderId);
     $item = $this->inventory->find($inventoryId);
     $stock = $item->stocks()->find($stockId);
     if ($stock instanceof InventoryStock) {
         return view('maintenance::work-orders.parts.inventory.stocks.take', compact('workOrder', 'item', 'stock'));
     }
     abort(404);
 }
コード例 #3
0
ファイル: Controller.php プロジェクト: redknitin/maintenance
 /**
  * Displays the edit form for the specified inventory.
  *
  * @param int|string $id
  *
  * @return mixed
  */
 public function edit($id)
 {
     $item = $this->inventory->find($id);
     return view('maintenance::inventory.edit', compact('item'));
 }
コード例 #4
0
 /**
  * Displays the form for creating a variant
  * of the specified inventory.
  *
  * @param int|string $inventoryId
  *
  * @return \Illuminate\View\View
  */
 public function create($inventoryId)
 {
     $item = $this->inventory->find($inventoryId);
     return view('maintenance::inventory.variants.create', compact('item'));
 }