diff --git a/app/Nova/Resources/Integration.php b/app/Nova/Resources/Integration.php index 91f492633..5a9e42d13 100644 --- a/app/Nova/Resources/Integration.php +++ b/app/Nova/Resources/Integration.php @@ -33,6 +33,7 @@ use Laravel\Nova\Fields\URL; use Laravel\Nova\Http\Requests\ActionRequest; use Laravel\Nova\Http\Requests\NovaRequest; +use Laravel\Nova\Query\Search\SearchableRelation; use Laravel\Nova\ResourceTool; use Publiq\InsightlyLink\InsightlyLink; use Publiq\InsightlyLink\InsightlyType; @@ -46,19 +47,21 @@ final class Integration extends Resource public static $title = 'name'; - /** - * @var array - */ - public static $search = [ - 'id', - 'name', - 'description', - ]; - protected static ?array $defaultSort = [ 'created_at' => 'desc', ]; + public static function searchableColumns(): array + { + return [ + 'id', + 'name', + 'description', + new SearchableRelation('auth0Clients', 'auth0_client_id'), + new SearchableRelation('uiTiDv1Consumers', 'consumer_key'), + ]; + } + /** * @return array */