コード例 #1
0
ファイル: Update.php プロジェクト: stevebauman/maintenance
 /**
  * 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();
 }
コード例 #2
0
ファイル: Store.php プロジェクト: stevebauman/maintenance
 /**
  * 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();
 }