Skip to content

processEnum(): Argument #1 ($value) must be of type BackedEnum|UnitEnum|Illuminate\Database\Query\Expression|string, null given #457

Closed
@rezalabbafi

Description

@rezalabbafi

i have this method in my repository

protected function _builder(): Builder
    {
        $model = $this->app->make($this->model());
        $builder = $model::query();
        // SOME OTHER LINES
        return $builder;
    }

When I'm using Laravel model caching and call this

$this->_builder()->find($id)

if $id = null then there is this error

GeneaLabs\LaravelModelCaching\CacheKey::processEnum(): Argument #1 ($value) must be of type BackedEnum|UnitEnum|Illuminate\Database\Query\Expression|string, null given, called in /var/www/html/vendor/genealabs/laravel-model-caching/src/CacheKey.php on line 429

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions