mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-02 21:52:34 +08:00
Model类增加scope方法
This commit is contained in:
@@ -614,6 +614,13 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
||||
return $result;
|
||||
}
|
||||
|
||||
// 命名范围
|
||||
public static function scope($name)
|
||||
{
|
||||
$model = new static();
|
||||
return $model->$name();
|
||||
}
|
||||
|
||||
// 解析模型的完整命名空间
|
||||
protected function parseModel($model)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user