simonzhd 发表于 2022-9-27 09:47:08

Laravel 中的 withoutGlobalScopes的使用

ScopeTest::withoutGlobalScope(StatusScope::class)->get();                         //移除指定作用域
ScopeTest::withoutGlobalScope('status')->get();                                 //移除闭包定义的作用域
ScopeTest::withoutGlobalScopes()->get();                                          //移除所有作用域
ScopeTest::withoutGlobalScopes()->get();   //移除某些作用域   

页: [1]
查看完整版本: Laravel 中的 withoutGlobalScopes的使用