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
Copy file name to clipboardExpand all lines: docs/book/v1/component/collection.md
+12-3Lines changed: 12 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,11 @@
1
1
# Create Collection
2
2
3
+
> This page assumes that you have created a Composer "make" script as described on the [Setup page](../setup.md#optional-add-dot-maker-to-composerjson).
4
+
3
5
> Collections can be created only in APIs.
4
6
7
+
## Run the command
8
+
5
9
To create a Collection, use either of the following commands:
6
10
7
11
```shell
@@ -14,7 +18,9 @@ OR
14
18
./vendor/bin/dot-maker collection
15
19
```
16
20
17
-
`dot-maker` needs to determine in which module you want to create the new Collection.
21
+
## Identify the target module
22
+
23
+
`dot-maker` needs to know in which module you want to create the new Collection.
18
24
To determine this, it will prompt you to enter the name of an existing module:
19
25
20
26
> Existing module name:
@@ -25,7 +31,7 @@ If you input a module name which does not exist (like, "NonExistentModule"), an
25
31
26
32
and will keep prompting for a valid module name until you provide one.
27
33
28
-
---
34
+
## Name the Collection
29
35
30
36
Once the target module has been identified, you will be prompted to input a name for the Collection:
31
37
@@ -43,8 +49,11 @@ If you input the name of an existing Collection (like, "ExistingCollection"), an
43
49
44
50
> Class "ExistingCollection" already exists at /path/to/project/src/ExistingModule/src/Collection/ExistingCollection.php
45
51
46
-
If you input a valid name, `dot-maker` will create the Collection and output a success message:
52
+
If you input a valid name (like, "NewCollection"), `dot-maker` will create the Collection and output a success message:
47
53
48
54
> Created Collection: /path/to/project/src/ExistingModule/src/Collection/NewCollection.php
49
55
56
+
## Create multiple Collections
57
+
50
58
To allow the creation of multiple Collections, the process will loop until you leave the name blank.
59
+
Each iteration creates a new Collection under the same module.
Copy file name to clipboardExpand all lines: docs/book/v1/component/command.md
+16-7Lines changed: 16 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,14 @@
1
1
# Create Command
2
2
3
+
> This page assumes that you have created a Composer "make" script as described on the [Setup page](../setup.md#optional-add-dot-maker-to-composerjson).
4
+
5
+
> `dot-maker` will look for a matching ServiceInterface in the module (e.g.: BookServiceInterface — BookCommand).
6
+
> If it finds one, it will automatically inject it into the Command.
7
+
3
8
To create a Command, use either of the following commands:
4
9
10
+
## Run the command
11
+
5
12
```shell
6
13
composer make command
7
14
```
@@ -12,7 +19,9 @@ OR
12
19
./vendor/bin/dot-maker command
13
20
```
14
21
15
-
`dot-maker` needs to determine in which module you want to create the new Command.
22
+
## Identify the target module
23
+
24
+
`dot-maker` needs to know in which module you want to create the new Command.
16
25
To determine this, it will prompt you to enter the name of an existing module:
17
26
18
27
> Existing module name:
@@ -23,7 +32,7 @@ If you input a module name which does not exist (like, "NonExistentModule"), an
23
32
24
33
and will keep prompting for a valid module name until you provide one.
25
34
26
-
---
35
+
## Name the Command
27
36
28
37
Once the target module has been identified, you will be prompted to input a name for the Command:
29
38
@@ -41,11 +50,11 @@ If you input the name of an existing Command (like, "ExistingCommand"), an error
41
50
42
51
> Class "ExistingCommand" already exists at /path/to/project/src/ExistingModule/src/Command/ExistingCommand.php
43
52
44
-
If you input a valid name, `dot-maker` will create the Command and output a success message:
53
+
If you input a valid name (like, "NewCommand"), `dot-maker` will create the Command and output a success message:
45
54
46
-
> Created Collection: /path/to/project/src/ExistingModule/src/Command/NewCommand.php
55
+
> Created Command: /path/to/project/src/ExistingModule/src/Command/NewCommand.php
47
56
48
-
To allow the creation of multiple Commands, the process will loop until you leave the name blank.
57
+
## Create multiple Commands
49
58
50
-
> dot-maker will look for a matching ServiceInterface in the module (e.g.: BookServiceInterface — BookCommand).
51
-
> If it finds one, it will automatically inject it into the Command.
59
+
To allow the creation of multiple Commands, the process will loop until you leave the name blank.
60
+
Each iteration creates a new Command under the same module.
Copy file name to clipboardExpand all lines: docs/book/v1/component/middleware.md
+12-3Lines changed: 12 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,11 @@
1
1
# Create Middleware
2
2
3
+
> This page assumes that you have created a Composer "make" script as described on the [Setup page](../setup.md#optional-add-dot-maker-to-composerjson).
4
+
3
5
To create a Middleware, use either of the following commands:
4
6
7
+
## Run the command
8
+
5
9
```shell
6
10
composer make middleware
7
11
```
@@ -12,7 +16,9 @@ OR
12
16
./vendor/bin/dot-maker middleware
13
17
```
14
18
15
-
`dot-maker` needs to determine in which module you want to create the new Middleware.
19
+
## Identify the target module
20
+
21
+
`dot-maker` needs to know in which module you want to create the new Middleware.
16
22
To determine this, it will prompt you to enter the name of an existing module:
17
23
18
24
> Existing module name:
@@ -23,7 +29,7 @@ If you input a module name which does not exist (like, "NonExistentModule"), an
23
29
24
30
and will keep prompting for a valid module name until you provide one.
25
31
26
-
---
32
+
## Name the Middleware
27
33
28
34
Once the target module has been identified, you will be prompted to input a name for the Middleware:
29
35
@@ -41,8 +47,11 @@ If you input the name of an existing Middleware (like, "ExistingMiddleware"), an
41
47
42
48
> Class "ExistingMiddleware" already exists at /path/to/project/src/ExistingModule/src/Middleware/ExistingMiddleware.php
43
49
44
-
If you input a valid name, `dot-maker` will create the Command and output a success message:
50
+
If you input a valid name (like, "NewMiddleware"), `dot-maker` will create the Command and output a success message:
45
51
46
52
> Created Middleware: /path/to/project/src/ExistingModule/src/Middleware/NewMiddleware.php
47
53
54
+
## Create multiple Middleware
55
+
48
56
To allow the creation of multiple Middleware, the process will loop until you leave the name blank.
57
+
Each iteration creates a new Middleware under the same module.
0 commit comments