📜  laravel 中的搜索查询 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:20.326000             🧑  作者: Mango

代码示例6
The find Method
If you are overriding the find method in your own models and calling parent::find() within your custom method, you should now change it to call the find method on the Eloquent query builder:

public static function find($id, $columns = ['*'])
{
    $model = static::query()->find($id, $columns);

    // ...

    return $model;
}