-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
- Loading branch information
There are no files selected for viewing
This file was deleted.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
<div class="modal__filter"> | ||
<div class="search-form"> | ||
<input class="form-control search-form__control" type="text" placeholder="Search..." title="Search" /> | ||
<button type="button" class="search-form__submit"> | ||
<span class="sr-only">Search</span> | ||
<x-root::icon name="search" class="search-form__icon" /> | ||
</button> | ||
</div> | ||
<div class="modal__filter" x-data="query"> | ||
@foreach($filters as $filter) | ||
@include($filter['template'], $filter) | ||
@endforeach | ||
</div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
namespace Cone\Root\Filters; | ||
|
||
class MediaSearch extends Search | ||
{ | ||
/** | ||
* The searchable attributes | ||
*/ | ||
protected array $attributes = [ | ||
'file_name', | ||
]; | ||
|
||
/** | ||
* Create a new filter instance. | ||
*/ | ||
public function __construct(array $attributes = ['file_name']) | ||
{ | ||
$this->attributes = $attributes; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getSearchableAttributes(): array | ||
{ | ||
return array_fill_keys($this->attributes, null); | ||
} | ||
} |