Skip to content

Commit

Permalink
fix(elasticsearch): return false in usesSoftDelete method
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaucau committed Jun 23, 2024
1 parent d5a71b4 commit da02d70
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/ScoutModelWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ public function __construct(Model $realModel)
$this->realModel = $realModel;
}

public static function __callStatic($method, $parameters)
{
if ($method === 'usesSoftDelete') {
return self::usesSoftDelete();
}

return (new static)->$method(...$parameters);
}

public function getRealModel(): Model
{
return $this->realModel;
Expand Down Expand Up @@ -200,7 +209,7 @@ public function getScoutKeyName()

protected static function usesSoftDelete()
{
throw new \Exception('Native Laravel soft delete meta not implemented in Scout for Flarum');
return false;
}

/**
Expand Down

0 comments on commit da02d70

Please sign in to comment.