Skip to content

Commit

Permalink
fix: filter stub generation: query and value positional arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
syntaxlexx committed May 11, 2023
1 parent c7893fe commit 014bc86
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/Console/Generators/stubs/filter.stub
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@ class DummyClass extends OsmoseFilter implements OsmoseFilterInterface
public function residue() :array
{
return [
"param" => function($value, $query) {
"param" => function($query, $value) {
return $query->where(function($q) use ($value) {
return $q->where('param1', 'like', $value . "%");
});
}
},
"param2" => function($query, $value) {
return $query->where('title', 'like', '%' . $value . '%');
},
"uid" => "column:uid",
"id" => "column:id",
];
}
}

0 comments on commit 014bc86

Please sign in to comment.