有一个名称为Shop的model,可以使用Shop::where("id",14)->first()
但在Illuminate\Database\Eloquent\Model中却找不到where方法。不过在555行找到了使用where的代码:
if ( ! is_null($instance = static::where($attributes)->first()))
{
return $instance;
}
这里的static::where()是怎么回事,Shop::where()是调用的哪里的where方法
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
闭关修行中......