PluginProbe
Fluent Support – Helpdesk & Customer Support Ticket System / 2.1.0
Fluent Support – Helpdesk & Customer Support Ticket System v2.1.0
2.4.0 2.3.2 2.3.1 2.3.0 2.2.1 2.2.0 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.4.0 1.4.1 1.4.2 1.4.5 1.4.6 1.4.7 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 All 68 releases
← All changes | app/Models/Agent.php +0 -31 trunk2.1.0 View file →
@@ -26,26 +26,8 @@
26 26 public function getSearchableFields(){
27 27 return $this->searchable;
28 28 }
29 29
30 - /**
31 - * Agent ids, resolved once per request. Reporting filters on this list
32 - * rather than whereHas('person', ...), which drove those queries off
33 - * fs_persons (no person_type index) and cost them their date range.
34 - *
35 - * @return array
36 - */
37 - public static function getAgentIds()
38 - {
39 - static $agentIds = null;
40 -
41 - if (is_null($agentIds)) {
42 - $agentIds = array_map('intval', static::query()->pluck('id')->all());
43 - }
44 -
45 - return $agentIds;
46 - }
47 -
48 30 public static function boot()
49 31 {
50 32 parent::boot();
51 33
@@ -79,20 +61,7 @@
79 61 {
80 62 return $this->belongsToMany(
81 63 AgentGroup::class, 'fs_tag_pivot', 'source_id', 'tag_id'
82 64 )->wherePivot('source_type', 'agent_group');
83 - }
84 -
85 - public function scopeMentionBy($query, $search)
86 - {
87 - if (!$search) {
88 - return $query;
89 - }
90 -
91 - return $query->where(function ($q) use ($search) {
92 - $q->where('first_name', 'LIKE', '%' . $search . '%')
93 - ->orWhere('last_name', 'LIKE', '%' . $search . '%')
94 - ->orWhere('email', 'LIKE', '%' . $search . '%');
95 - });
96 65 }
97 66
98 67 }