public function getTableTypeIdAttribute($value) { return TableType::where('id', '=', $value)->first()->type; }