30 lines
603 B
PHP
30 lines
603 B
PHP
<?php
|
|
|
|
namespace App\Livewire;
|
|
|
|
use Livewire\Component;
|
|
class Notification extends Component
|
|
{
|
|
public $notifs = [];
|
|
|
|
|
|
public function mount()
|
|
{
|
|
$this->loadNotifications();
|
|
}
|
|
|
|
// Get filtered users based on the search input
|
|
public function loadNotifications()
|
|
{
|
|
$this->notifs = collect(json_decode(file_get_contents(storage_path('app/notifs.json')), true));
|
|
}
|
|
|
|
|
|
public function render()
|
|
{
|
|
return view('livewire.notification.notification', [
|
|
'notification' => $this->notifs, // Pass filtered notifs here
|
|
]);
|
|
}
|
|
}
|