From 014bc86826106011458d1cf5da6a236b95340578 Mon Sep 17 00:00:00 2001 From: SyntaxLexx Date: Thu, 11 May 2023 21:35:39 +0300 Subject: [PATCH] fix: filter stub generation: query and value positional arguments --- app/Console/Generators/stubs/filter.stub | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Console/Generators/stubs/filter.stub b/app/Console/Generators/stubs/filter.stub index afda49e..8593b80 100644 --- a/app/Console/Generators/stubs/filter.stub +++ b/app/Console/Generators/stubs/filter.stub @@ -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", ]; } }