filter tickets with user project_id
This commit is contained in:
parent
d5b739f88a
commit
34cd3e7672
1 changed files with 3 additions and 0 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue