⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.19
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Server Software:
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
id
/
crm.dev-unit.com
/
app
/
Http
/
Livewire
/
View File Name :
TaxRates.php
<?php namespace App\Http\Livewire; use App\Models\TaxRate; use Illuminate\Contracts\Foundation\Application; use Illuminate\Contracts\Pagination\LengthAwarePaginator; use Illuminate\Contracts\View\Factory; class TaxRates extends SearchableComponent { /** * @var string[] */ protected $listeners = [ 'refresh' => '$refresh', 'deleteTaxRate', ]; /** * @return string */ public function model() { return TaxRate::class; } /** * @return string[] */ public function searchableFields() { return ['name', 'tax_rate']; } /** * @return Application|Factory */ public function render() { $taxRates = $this->searchTaxRates(); return view('livewire.tax-rates', compact('taxRates')); } /** * @return LengthAwarePaginator */ public function searchTaxRates() { $this->getQuery(); return $this->paginate(); } /** * @param $taxRateId */ public function deleteTaxRate($taxRateId) { $taxRate = TaxRate::find($taxRateId); activity()->performedOn($taxRate)->causedBy(getLoggedInUser()) ->useLog('Tax Rate deleted.')->log($taxRate->name.' Tax Rate deleted.'); $taxRate->delete(); $this->dispatchBrowserEvent('deleted'); $this->searchTaxRates(); } public function updatingSearch() { $this->resetPage(); } }