/** * Execute the job. * * @return bool */ public function handle() { $this->stock->location_id = $this->request->input('location', $this->stock->location_id); $this->stock->quantity = $this->request->input('quantity', $this->stock->quantity); $this->stock->cost = $this->request->input('cost'); $this->stock->reason = $this->request->input('reason'); return $this->stock->save(); }
/** * Execute the job. * * @return bool */ public function handle() { $this->stock->user_id = auth()->id(); $this->stock->inventory_id = $this->inventory->getKey(); $this->stock->location_id = $this->request->input('location'); $this->stock->quantity = $this->request->input('quantity'); $this->stock->cost = $this->request->input('cost'); $this->stock->reason = $this->request->input('reason'); return $this->stock->save(); }