is_print) { case 0: return ''; break; case 1: return ''; break; } } protected function getStatusTextAttribute() { if ($this->status == 0) { return '申请中'; } elseif ($this->status == 1) { return '已生成'; } elseif ($this->status == 2) { return '已驳回'; } else { return $this->status; } } public function user() { return $this->belongsTo(\App\User::class); } }