コード例 #1
0
ファイル: Update.php プロジェクト: stevebauman/maintenance
 /**
  * Execute the job.
  *
  * @return bool
  */
 public function handle()
 {
     $this->inventory->category_id = $this->request->input('category', $this->inventory->category_id);
     $this->inventory->metric_id = $this->request->input('metric', $this->inventory->metric_id);
     $this->inventory->name = $this->request->input('name', $this->inventory->name);
     $this->inventory->description = $this->request->clean($this->request->input('description', $this->inventory->description));
     return $this->inventory->save();
 }
コード例 #2
0
ファイル: Store.php プロジェクト: stevebauman/maintenance
 /**
  * Execute the job.
  *
  * @return bool
  */
 public function handle()
 {
     $this->inventory->user_id = auth()->id();
     $this->inventory->category_id = $this->request->input('category');
     $this->inventory->metric_id = $this->request->input('metric');
     $this->inventory->name = $this->request->input('name');
     $this->inventory->description = $this->request->clean($this->request->input('description'));
     return $this->inventory->save();
 }