diff --git a/src/PostgresEngine.php b/src/PostgresEngine.php index b92b3e0..9e343e5 100644 --- a/src/PostgresEngine.php +++ b/src/PostgresEngine.php @@ -529,7 +529,13 @@ protected function preserveModel(Model $model) */ protected function searchConfig(Model $model) { - return $this->option($model, 'config', $this->config('config', '')) ?: null; + $searchConfig = $this->option($model, 'config', $this->config('config', '')); + + if (is_callable($searchConfig)) { + $searchConfig = $searchConfig($model); + } + + return $searchConfig; } /**