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