protected function bindWithKey(Model $entity, ?string $name): ?string
    {
        if (\is_null($name) || (\strpos($name, '{') === false && \strpos($name, '}') === false)) {
            return $name;
        }

        $id = $entity->getKey();

        if (! isset($this->data[$id])) {
            $data = \array_merge(Arr::dot(['entity' => $entity->toArray()]), \compact('id'));

            $this->data[$id] = $data;
        }

        return Str::replace($name, $this->data[$id]);
    }
protected function bindWithKey(Model $entity, ?string $name): ?string
    {
        if (\is_null($name) || (\strpos($name, '{') === false && \strpos($name, '}') === false)) {
            return $name;
        }

        $id = $entity->getKey();

        if (! isset($this->data[$id])) {
            $data = \array_merge(Arr::dot(['entity' => $entity->toArray()]), \compact('id'));

            $this->data[$id] = $data;
        }

        return Str::replace($name, $this->data[$id]);
    }
protected function bindWithKey ( Model $ entity , ? string $ name ) : ? string { if ( \ is_null ( $ name ) || ( \ strpos ( $ name , '{' ) === false && \ strpos ( $ name , '}' ) === false ) ) { return $ name ; } $ id = $ entity -> getKey ( ) ; if ( ! isset ( $ this -> data [ $ id ] ) ) { $ data = \ array_merge ( Arr :: dot ( [ 'entity' => $ entity -> toArray ( ) ] ) , \ compact ( 'id' ) ) ; $ this -> data [ $ id ] = $ data ; } return Str :: replace ( $ name , $ this -> data [ $ id ] ) ; }
Resolve table name.

@param  \Illuminate\Database\Eloquent\Model  $entity
@param  string|null  $name

@return string|null
Resolve table name .