我正在尝试浏览特定脚本的主页,但我遇到了这个问题
“ErrorException (E_ERROR) 没有模型 [App\User] 5 的查询结果(视图:/.../core/resources/views/newhome/home.blade.php)”
/home2/.../core/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php
代码:
$result = $this->find($id, $columns);
if (is_array($id)) {
if (count($result) == count(array_unique($id))) {
return $result;
}
} elseif (! is_null($result)) {
return $result;
}
throw (new ModelNotFoundException)->setModel(
get_class($this->model), $id
);
}
/**
* Find a model by its primary key or return fresh model instance.
*
* @param mixed $id
* @param array $columns
* @return \Illuminate\Database\Eloquent\Model
*/
public function findOrNew($id, $columns = ['*'])
{
if (! is_null($model = $this->find($id, $columns))) {
红颜莎娜
翻翻过去那场雪