xyc92

Results 1 issues of xyc92

在全局定义了查询范围 protected $globalScope = ['is_delete']; public function scopeIs_Delete($query): void { $query->where('is_delete',0); } 正常使用Model::withoutGlobalScope()可以关闭这个范围 但是在闭包里面join查询时候没有办法调用这个静态方法,还是会报字段重复的错误 SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'is_delete' in where clause is ambiguous 请问有解决办法吗

ORM