14-3章节出问题了
来源:14-3 使用全局scope进行软删除模型

慕码人4209688
2018-11-21
老师求救啊
加入了protected static function boot之后就开始报错
注释之后首页可以正常显示
首页无法显示了
写回答
2回答
-
轩脉刃
2018-12-13
// 全局scope的方式
protected static function boot()
{
parent::boot();
static::addGlobalScope("avaiable", function(Builder $builder){
$builder->whereIn('status', [0, 1]);
});
}00 -
轩脉刃
2018-12-13
protected static function boot 里面什么代码需要贴一下啊
00
相似问题