Maurits van der Schee 4 years ago
parent
commit
f162331212
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      src/index.php

+ 6
- 0
src/index.php View File

@@ -17,6 +17,12 @@ $config = new Config([
17 17
     'password' => 'php-crud-api',
18 18
     'database' => 'php-crud-api',
19 19
     // 'debug' => false
20
+'customization.beforeHandler' => function ($operation, $tableName, $request, $environment) {
21
+  $param = $request->getQueryParams();
22
+  $param["filter"] = "field1,eq,value1";
23
+  return $request->withQueryParams($param);            
24
+}
25
+
20 26
 ]);
21 27
 $request = RequestFactory::fromGlobals();
22 28
 $api = new Api($config);

Loading…
Cancel
Save