File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/yajra/Datatables/Engines Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1212
1313use Closure ;
1414use Illuminate \Contracts \Support \Arrayable ;
15+ use Illuminate \Support \Arr ;
1516use Illuminate \Support \Collection ;
1617use Illuminate \Support \Str ;
1718use yajra \Datatables \Contracts \DataTableEngine ;
@@ -123,15 +124,14 @@ function ($row) use ($columns) {
123124 $ keyword = $ this ->request ->keyword ();
124125 foreach ($ this ->request ->searchableColumnIndex () as $ index ) {
125126 $ column = $ this ->getColumnName ($ index );
126-
127- if ( ! array_key_exists ($ column , $ data )) {
127+ if ( ! $ value = Arr::get ($ data , $ column )) {
128128 continue ;
129129 }
130130
131131 if ($ this ->isCaseInsensitive ()) {
132- $ found [] = Str::contains (Str::lower ($ data [ $ column ] ), Str::lower ($ keyword ));
132+ $ found [] = Str::contains (Str::lower ($ value ), Str::lower ($ keyword ));
133133 } else {
134- $ found [] = Str::contains ($ data [ $ column ] , $ keyword );
134+ $ found [] = Str::contains ($ value , $ keyword );
135135 }
136136 }
137137
You can’t perform that action at this time.
0 commit comments