问答 / 173 / 3 / 创建于 2年前
laravel-admin setXXXrAttribute getXXXrAttribute 如何使用访问器和修改器
文档里面有使用方法《Laravel 8 中文文档》
getTextAttribute ——> ->text
getTextAttribute
->text
如何使用很简单,场景示例
intro
html
xss
htmlspecialchars
public function setIntroAttribute($value) { return htmlspecialchars($value); }
attach_json
json
public function getAttachJsonAttribute($value) { return json_decode($value, true); }
我要举报该,理由是:
推荐文章: