mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-02-05 03:00:52 -06:00
- Complete rewrite of meta data system - New media hub feature. - Torrent Bumping Refactor - Wish System Disabled until refactored - Fetch meta command added for fetchinng new meta on prexsisnting torrents. - plus alot more - closes #1428 - closes #1344 - closes #1147 - closes #361
41 lines
851 B
PHP
41 lines
851 B
PHP
<?php
|
|
|
|
namespace App\Http\Livewire;
|
|
|
|
use Livewire\Component;
|
|
use App\Models\Network;
|
|
use Livewire\WithPagination;
|
|
|
|
class NetworkSearch extends Component
|
|
{
|
|
use WithPagination;
|
|
|
|
protected $updatesQueryString = ['searchTerm'];
|
|
|
|
public $searchTerm;
|
|
|
|
public function mount()
|
|
{
|
|
$this->searchTerm = request()->query('searchTerm', $this->searchTerm);
|
|
}
|
|
|
|
public function paginationView()
|
|
{
|
|
return 'vendor.pagination.livewire-pagination';
|
|
}
|
|
|
|
public function updatingSearchTerm()
|
|
{
|
|
$this->resetPage();
|
|
}
|
|
|
|
public function render()
|
|
{
|
|
$search_term = '%' . $this->searchTerm . '%';
|
|
|
|
return view('livewire.network-search', [
|
|
'networks' => Network::withCount('tv')->where('name', 'LIKE', $search_term)->orderBy('name', 'asc')->paginate(30)
|
|
]);
|
|
}
|
|
}
|