generated from liutk/owl-admin-base
处理nl2br
parent
1968dc461e
commit
4304072d07
|
|
@ -19,7 +19,7 @@ class ActivityResource extends JsonResource
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'name' => $this->name,
|
'name' => $this->name,
|
||||||
'cover' => $this->cover ??'',
|
'cover' => $this->cover ??'',
|
||||||
'rules' => $this->rules ??'',
|
'rules' => nl2br($this->rules ??''),
|
||||||
'start_at' => $this->start_at->format('Y-m-d H:i'),
|
'start_at' => $this->start_at->format('Y-m-d H:i'),
|
||||||
'end_at' => $this->end_at->format('Y-m-d H:i'),
|
'end_at' => $this->end_at->format('Y-m-d H:i'),
|
||||||
'state' => $this->state,
|
'state' => $this->state,
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ class UserGiftResource extends JsonResource
|
||||||
return $this->gift->rank;
|
return $this->gift->rank;
|
||||||
}, ''),
|
}, ''),
|
||||||
'gift_explain'=> $this->whenLoaded('gift', function () {
|
'gift_explain'=> $this->whenLoaded('gift', function () {
|
||||||
return $this->gift->explain;
|
return nl2br($this->gift->explain);
|
||||||
}, ''),
|
}, ''),
|
||||||
'activity_name' => $this->whenLoaded('activity', function () {
|
'activity_name' => $this->whenLoaded('activity', function () {
|
||||||
return $this->activity->name;
|
return $this->activity->name;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue