Skip to content

Commit 8b51b98

Browse files
committed
Readme updates
1 parent 14122c7 commit 8b51b98

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,19 @@ public function mixedParam(Request $request)
101101
```
102102
Note that while you can write your own validation logic, here we chose to use the already existing method [`getValidatedData()`](#getvalidateddataclassname-methodname-array) that is provided by the ClassController - the method takes a class method name as a parameter and then validates all the required method parameters.
103103

104+
## Creating a ClassController with Laravel Artisan
105+
First, make sure you publish the stubs with the following command below:
106+
107+
```bash
108+
php artisan vendor:publish --provider="MMedia\ClassController\ClassControllerServiceProvider" --tag=stubs
109+
```
110+
111+
You can then use the Artisan command to create ClassControllers whenever you want. Specify the `---type=class` option, followed by the class name you are inheriting, to create a new ClassController:
112+
113+
```bash
114+
php artisan make:controller --type=class Test
115+
```
116+
104117
## In detail
105118

106119
### Responses

0 commit comments

Comments
 (0)