-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(action_log): Make Action Log view Livewire Component
- Loading branch information
1 parent
01eef44
commit 045a67b
Showing
4 changed files
with
54 additions
and
31 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
app/Http/Livewire/Dashboard/Administration/ViewActionLog.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
namespace App\Http\Livewire\Dashboard\Administration; | ||
|
||
use App\Events\ActionLog; | ||
use App\Http\Livewire\DataTable\WithPerPagePagination; | ||
use App\Models\Action; | ||
use Auth; | ||
use Livewire\Component; | ||
|
||
class ViewActionLog extends Component | ||
{ | ||
use WithPerPagePagination; | ||
|
||
protected $listeners = ['refreshData']; | ||
|
||
public $search = ''; | ||
|
||
public function render() | ||
{ | ||
return view('livewire.dashboard.administration.view-action-log', [ | ||
'logs' => $this->applyPagination(Action::query()->orderBy('id', 'desc')->search('message', $this->search)), | ||
]); | ||
} | ||
|
||
public function updatedSearch(){ | ||
$this->resetPage(); | ||
} | ||
|
||
public function refreshData(){ | ||
// Placeholder | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters