Skip to content

Commit

Permalink
Merge pull request #1183 from cultuurnet/PPF-507-search-on-key
Browse files Browse the repository at this point in the history
PPF-507 Enable searching on keys UiTiD and Auth0
  • Loading branch information
LucWollants authored Jun 7, 2024
2 parents c17aea0 + 1a0e019 commit 49cda73
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions app/Nova/Resources/Integration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -46,19 +47,21 @@ final class Integration extends Resource

public static $title = 'name';

/**
* @var array<string>
*/
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<Field|ResourceTool>
*/
Expand Down

0 comments on commit 49cda73

Please sign in to comment.