__('Is_Read 0'), '1' => __('Is_Read 1')]; } public function getBillNameAttr($value, $data) { $bill_row = Bill::where(['bill_table' => $data['bill']])->find(); if ($bill_row) { return $bill_row['bill_name']; } return $data['bill']; } public function getBillRowTitleAttr($value, $data) { $api = new api(); $bill_row = $api->getBillRow($data['bill'], $data['bill_id']); if ($bill_row){ $name = ''; if (isset($bill_row['name'])) { $name = $bill_row['name']; } elseif (isset($bill_row['titile'])){ $name = $bill_row['titile']; } return $name; } return ''; } public function getSenderNameAttr($value, $data) { $admin=Admin::find($data['sender_id']); if ($admin){ return $admin['nickname']; } else{ return ''; } } public function getIsReadTextAttr($value, $data) { $value = $value ? $value : (isset($data['is_read']) ? $data['is_read'] : ''); $list = $this->getIsReadList(); return isset($list[$value]) ? $list[$value] : ''; } }