You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
456 B
PHP

<?php
namespace App\Http\Controllers;
use App\Models\Notification;
use Illuminate\Http\Request;
class NotificationController extends Controller
{
public function index()
{
$query = Notification::where('entity_type', \App\Models\User::class)
->orderBy('is_read', 'asc')
->orderBy('created_at', 'desc');
return inertia('Notification/Index', [
'query' => $query->paginate(),
]);
}
}