laravel访问器里面给其他属性赋值
class Post extends Model
{
public $is_truncation = false;
public function getSummaryAttribute()
{
$this->is_truncation = true;
......
}
}
这样操作可以
推荐文章: