@@ -126,14 +126,14 @@ public function scopeWhereCategoryName($query, $search)
126126 {
127127 foreach (explode (' ' , $ search ) as $ term ) {
128128 $ query ->whereHas ('category ' , function ($ query ) use ($ term ) {
129- $ query ->where ('name ' , 'LIKE ' , '% ' . $ term . '% ' );
129+ $ query ->where ('name ' , 'LIKE ' , '% ' . $ term. '% ' );
130130 });
131131 }
132132 }
133133
134134 public function scopeWhereNotes ($ query , $ search )
135135 {
136- $ query ->where ('notes ' , 'LIKE ' , '% ' . $ search . '% ' );
136+ $ query ->where ('notes ' , 'LIKE ' , '% ' . $ search. '% ' );
137137 }
138138
139139 public function scopeWhereCategory ($ query , $ categoryId )
@@ -188,9 +188,9 @@ public function scopeWhereSearch($query, $search)
188188 {
189189 foreach (explode (' ' , $ search ) as $ term ) {
190190 $ query ->whereHas ('category ' , function ($ query ) use ($ term ) {
191- $ query ->where ('name ' , 'LIKE ' , '% ' . $ term . '% ' );
191+ $ query ->where ('name ' , 'LIKE ' , '% ' . $ term. '% ' );
192192 })
193- ->orWhere ('notes ' , 'LIKE ' , '% ' . $ term . '% ' );
193+ ->orWhere ('notes ' , 'LIKE ' , '% ' . $ term. '% ' );
194194 }
195195 }
196196
0 commit comments