Bad Method Call: Did you mean App\Models\Iklan::transformModelValue()

Idk why it returns error. I just paste from documentation and not change any words.

==== The Code ===

public function toSearchableArray()
{
$array = $this->toArray();

    $array = $this->transform($array);

    return $array;
}

===== then it shows error like this ===

Call to undefined method App\Models\Iklan::transform()

at vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php:50
46▕ * @throws \BadMethodCallException
47▕ */
48▕ protected static function throwBadMethodCallException($method)
49▕ {
➜ 50▕ throw new BadMethodCallException(sprintf(
51▕ ‘Call to undefined method %s::%s()’, static::class, $method
52▕ ));
53▕ }
54▕ }

• Bad Method Call: Did you mean App\Models\Iklan::transformModelValue() ?

  +2 vendor frames 

3 app/Models/Iklan.php:29
Illuminate\Database\Eloquent\Model::__call(“transform”)

  +1 vendor frames 

5 [internal]:0
Laravel\Scout\Engines\AlgoliaEngine::Laravel\Scout\Engines{closure}(Object(App\Models\Iklan))

Solved! You just have to delete transform method.