New notification page..
This commit is contained in:
28
app/Http/Livewire/Common/Notifications/Imports.php
Normal file
28
app/Http/Livewire/Common/Notifications/Imports.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire\Common\Notifications;
|
||||
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
class Imports extends Component
|
||||
{
|
||||
use WithPagination;
|
||||
|
||||
public function render()
|
||||
{
|
||||
$limit = 5;
|
||||
|
||||
$notifications = user()->notifications()->unread()
|
||||
->where('type', 'App\Notifications\Common\ImportCompleted')
|
||||
->orWhere('type', 'App\Notifications\Common\ImportFailed')
|
||||
->paginate($limit);
|
||||
|
||||
return view('livewire.common.notifications.imports', compact('notifications'));
|
||||
}
|
||||
|
||||
public function paginationView()
|
||||
{
|
||||
return 'vendor.livewire.default';
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user