mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 19:37:23 +08:00
add global search
This commit is contained in:
@@ -75,6 +75,16 @@ class ClaimResource extends Resource
|
||||
return $query->when($data['uid'], fn (Builder $query, $uid) => $query->where("uid", $uid));
|
||||
})
|
||||
,
|
||||
Tables\Filters\Filter::make('torrent_id')
|
||||
->form([
|
||||
Forms\Components\TextInput::make('torrent_id')
|
||||
->label(__('claim.fields.torrent_id'))
|
||||
->placeholder(__('claim.fields.torrent_id'))
|
||||
,
|
||||
])->query(function (Builder $query, array $data) {
|
||||
return $query->when($data['torrent_id'], fn (Builder $query, $value) => $query->where("torrent_id", $value));
|
||||
})
|
||||
,
|
||||
])
|
||||
->actions([
|
||||
// Tables\Actions\EditAction::make(),
|
||||
|
||||
@@ -5,8 +5,6 @@ namespace App\Models;
|
||||
use App\Repositories\TagRepository;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use JeroenG\Explorer\Application\Explored;
|
||||
use Laravel\Scout\Searchable;
|
||||
|
||||
class Torrent extends NexusModel
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user