Skip to content

Commit d8656e7

Browse files
committed
Rename agentTickets() ticket scope to fromAgent()
1 parent 273c687 commit d8656e7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/Models/Ticket.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -561,14 +561,14 @@ public function scopeUserTickets($query, $id)
561561
}
562562

563563
/**
564-
* Get all agent tickets.
564+
* Get tickets from specified Agent
565565
*
566566
* @param $query
567567
* @param $id
568568
*
569569
* @return mixed
570570
*/
571-
public function scopeAgentTickets($query, $id)
571+
public function scopeFromAgent($query, $id)
572572
{
573573
return $query->where('agent_id', $id);
574574
}
@@ -634,7 +634,7 @@ public function scopeVisibleForAgent($query, $id = false)
634634
});
635635
} else {
636636
// Returns all tickets Owned by Agent with $id only
637-
return $query->agentTickets($id);
637+
return $query->fromAgent($id);
638638
}
639639
} else {
640640
// Agent with currentLevel() == 1
@@ -725,7 +725,7 @@ public function scopeFiltered($query, $ticketList, $filter = false)
725725

726726
// Agent filter
727727
if ((!$filter or $filter == 'agent') and session()->has('panichd_filter_agent')) {
728-
$query = $query->agentTickets(session('panichd_filter_agent'));
728+
$query = $query->fromAgent(session('panichd_filter_agent'));
729729
}
730730

731731
// Owner filter

0 commit comments

Comments
 (0)