You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will create a template for **controller**, **service** and **model (with prepopulated columns from DB)** (optionally, with the **--decorated** flag it will create also a **decorator** and **middleware**) and will print instructions on what is left to be done manually.
26
26
27
27
If connection is not the default one, it can be specified in the command option.
28
28
29
-
If table is not the plural snake cased resourceName, then it can be specified in the table option.
29
+
If table is not the snake cased resourceName, then it can be specified in the table option.
30
30
31
-
Run just **php artisan make:api-resource** for interactive mode that will try to guess the tableName and use default connectionName (except --decorated).
31
+
Run just **php artisan make:api-resource** or **php artisan make:api-resource --decorated** for interactive mode that will try to guess the tableName and use default connectionName.
32
+
33
+
**--composed** flag will generate model and service for composed primary key
32
34
33
35
Example:
34
36
```
@@ -41,8 +43,6 @@ TODO:
41
43
- Fill the model's properties and relations,
42
44
- Define validations in controller,
43
45
- Expose resource in DbCrudMap::MODEL_FQN_TO_CONTROLLER_MAP.
44
-
Created Decorator: /var/www/html/project/app/Decorators/OperationDecorator.php
45
-
Created Middleware: /var/www/html/project/app/Http/Midleware/Decorators/OperationsMiddleware.php
0 commit comments