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
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,10 @@ If you input a module name which does not exist (like, "NonExistentModule"), an
31
31
32
32
and will keep prompting for a valid module name until you provide one.
33
33
34
+
Once an existing module name (like, "ExistingModule") is provided, `dot-maker` will output a success message:
35
+
36
+
> Found Module "ExistingModule"
37
+
34
38
## Name the Collection
35
39
36
40
Once the target module has been identified, you will be prompted to input a name for the Collection:
@@ -39,6 +43,8 @@ Once the target module has been identified, you will be prompted to input a name
39
43
40
44
**The name must contain only letters and numbers.**
41
45
46
+
> You don't have to append "Collection" to the name. It is automatically appended. See our [Naming Standards](../naming-standards.md) page for more information.
47
+
42
48
If you leave the name blank, the process will exit.
43
49
44
50
If you input an invalid name (like, "."), an error will be thrown:
Copy file name to clipboardExpand all lines: docs/book/v1/component/command.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,10 @@ If you input a module name which does not exist (like, "NonExistentModule"), an
32
32
33
33
and will keep prompting for a valid module name until you provide one.
34
34
35
+
Once an existing module name (like, "ExistingModule") is provided, `dot-maker` will output a success message:
36
+
37
+
> Found Module "ExistingModule"
38
+
35
39
## Name the Command
36
40
37
41
Once the target module has been identified, you will be prompted to input a name for the Command:
@@ -40,6 +44,8 @@ Once the target module has been identified, you will be prompted to input a name
40
44
41
45
**The name must contain only letters and numbers.**
42
46
47
+
> You don't have to append "Command" to the name. It is automatically appended. See our [Naming Standards](../naming-standards.md) page for more information.
48
+
43
49
If you leave the name blank, the process will exit.
44
50
45
51
If you input an invalid name (like, "."), an error will be thrown:
> This page assumes that you have created a Composer "make" script as described on the [Setup page](../setup.md#add-dot-maker-to-composerjson).
4
+
5
+
To create an InputFilter, use either of the following commands:
6
+
7
+
## Run the command
8
+
9
+
```shell
10
+
composer make input-filter
11
+
```
12
+
13
+
OR
14
+
15
+
```shell
16
+
./vendor/bin/dot-maker input-filter
17
+
```
18
+
19
+
## Identify the target module
20
+
21
+
`dot-maker` needs to know in which module you want to create the new InputFilter.
22
+
To determine this, it will prompt you to enter the name of an existing module:
23
+
24
+
> Existing module name:
25
+
26
+
If you input a module name which does not exist (like, "NonExistentModule"), an error will be thrown:
27
+
28
+
> Module "NonExistentModule" not found
29
+
30
+
and will keep prompting for a valid module name until you provide one.
31
+
32
+
Once an existing module name (like, "ExistingModule") is provided, `dot-maker` will output a success message:
33
+
34
+
> Found Module "ExistingModule"
35
+
36
+
## Name the InputFilter
37
+
38
+
Once the target module has been identified, you will be prompted to input a name for the InputFilter:
39
+
40
+
> InputFilter name:
41
+
42
+
**The name must contain only letters and numbers.**
43
+
44
+
> You don't have to append "InputFilter" to the name. It is automatically appended. See our [Naming Standards](../naming-standards.md) page for more information.
45
+
46
+
If you leave the name blank, the process will exit.
47
+
48
+
If you input an invalid name (like, "."), an error will be thrown:
49
+
50
+
> Invalid InputFilter name: "."
51
+
52
+
If you input the name of an existing InputFilter (like, "ExistingInputFilter"), an error will be thrown:
53
+
54
+
> Class "ExistingInputFilter" already exists at /path/to/project/src/ExistingModule/src/InputFilter/ExistingInputFilter.php
55
+
56
+
Once you input a valid name (like, "Book"), `dot-maker` will prompt you to confirm which CRUD operations will be performed on the resource:
57
+
58
+
### Create resources
59
+
60
+
The prompt asks you whether you want to create resources:
61
+
62
+
> Allow creating Resources? [Y(es)/n(o)]:
63
+
64
+
On confirmation, the process will create the following file:
Copy file name to clipboardExpand all lines: docs/book/v1/component/middleware.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,10 @@ If you input a module name which does not exist (like, "NonExistentModule"), an
29
29
30
30
and will keep prompting for a valid module name until you provide one.
31
31
32
+
Once an existing module name (like, "ExistingModule") is provided, `dot-maker` will output a success message:
33
+
34
+
> Found Module "ExistingModule"
35
+
32
36
## Name the Middleware
33
37
34
38
Once the target module has been identified, you will be prompted to input a name for the Middleware:
@@ -37,6 +41,8 @@ Once the target module has been identified, you will be prompted to input a name
37
41
38
42
**The name must contain only letters and numbers.**
39
43
44
+
> You don't have to append "Middleware" to the name. It is automatically appended. See our [Naming Standards](../naming-standards.md) page for more information.
45
+
40
46
If you leave the name blank, the process will exit.
41
47
42
48
If you input an invalid name (like, "."), an error will be thrown:
@@ -47,7 +53,7 @@ If you input the name of an existing Middleware (like, "ExistingMiddleware"), an
47
53
48
54
> Class "ExistingMiddleware" already exists at /path/to/project/src/ExistingModule/src/Middleware/ExistingMiddleware.php
49
55
50
-
If you input a valid name (like, "NewMiddleware"), `dot-maker` will create the Command and output a success message:
56
+
If you input a valid name (like, "NewMiddleware"), `dot-maker` will create the Middleware and output a success message:
51
57
52
58
> Created Middleware: /path/to/project/src/ExistingModule/src/Middleware/NewMiddleware.php
0 commit comments