We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7265f1c commit 12d14a5Copy full SHA for 12d14a5
src/lib/items/RouteData.php
@@ -317,6 +317,12 @@ protected function detectUrlPattern():void
317
$parts = explode('/', $customRoute);
318
$this->action = array_pop($parts);
319
$this->controller = array_pop($parts);
320
+
321
+ if ($this->action === 'list') {
322
+ $this->type = self::TYPE_COLLECTION;
323
+ } elseif ($this->action === 'view') {
324
+ $this->type = self::TYPE_RESOURCE;
325
+ }
326
}
327
return;
328
tests/specs/issue_fix/102_fractalaction_not_generated_for_root_path/index.php
@@ -7,6 +7,7 @@
7
'excludeModels' => [
8
'Error',
9
],
10
+ 'useJsonApi' => true,
11
'generateControllers' => true,
12
'generateMigrations' => false,
13
'generateModelFaker' => false,
0 commit comments