Skip to content

Commit

Permalink
adds additional search ability on tracing
Browse files Browse the repository at this point in the history
  • Loading branch information
yordadev committed Oct 24, 2024
1 parent 22a58f4 commit b127c30
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Models/ShortUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ public function scopeHasTracing($query, $search)
$query->join('short_url_tracings', 'short_urls.id', '=', 'short_url_tracings.short_url_id')
->where(function ($subWhereQuery) use ($search) {
$subWhereQuery->where('short_url_tracings.utm_source', 'like', '%'.$search.'%')
->orWhere('short_urls.identifier', 'like', '%'.$search.'%')
->orWhere('short_urls.domain', 'like', '%'.$search.'%')
->orWhere('short_url_tracings.utm_id', 'like', '%'.$search.'%')
->orWhere('short_url_tracings.utm_medium', 'like', '%'.$search.'%')
->orWhere('short_url_tracings.utm_campaign', 'like', '%'.$search.'%')
->orWhere('short_url_tracings.utm_content', 'like', '%'.$search.'%')
Expand Down

0 comments on commit b127c30

Please sign in to comment.