public function delete($id) { if (is_object($id)) { $id = $id->id; } $award = Award::withTrashed()->whereId($id)->first(); if ($award) { $award->delete(); } return $this->listener->statusResponse(['award' => $award]); }
public function getTitleAttribute($val) { return Award::titleForType($this->name); }