Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mohitpanjwani committed Feb 16, 2022
1 parent 68575b6 commit 6a3e9e1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/Models/Expense.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,14 @@ public function scopeWhereCategoryName($query, $search)
{
foreach (explode(' ', $search) as $term) {
$query->whereHas('category', function ($query) use ($term) {
$query->where('name', 'LIKE', '%' . $term . '%');
$query->where('name', 'LIKE', '%'.$term.'%');
});
}
}

public function scopeWhereNotes($query, $search)
{
$query->where('notes', 'LIKE', '%' . $search . '%');
$query->where('notes', 'LIKE', '%'.$search.'%');
}

public function scopeWhereCategory($query, $categoryId)
Expand Down Expand Up @@ -188,9 +188,9 @@ public function scopeWhereSearch($query, $search)
{
foreach (explode(' ', $search) as $term) {
$query->whereHas('category', function ($query) use ($term) {
$query->where('name', 'LIKE', '%' . $term . '%');
$query->where('name', 'LIKE', '%'.$term.'%');
})
->orWhere('notes', 'LIKE', '%' . $term . '%');
->orWhere('notes', 'LIKE', '%'.$term.'%');
}
}

Expand Down

0 comments on commit 6a3e9e1

Please sign in to comment.