diff --git a/app/Http/Controllers/TicketController.php b/app/Http/Controllers/TicketController.php index 3c2db8d..f8fc8f2 100644 --- a/app/Http/Controllers/TicketController.php +++ b/app/Http/Controllers/TicketController.php @@ -33,6 +33,9 @@ class TicketController extends Controller public function index(SortTickets $request) { $tickets = Ticket::query(); + if (auth()->user()->project_id) { + $tickets = $tickets->where('project_id', auth()->user()->project_id); + } if ($request->status) { $tickets = $tickets->where('status', TicketStatus::archived());