Skip to content

Commit

Permalink
Readme updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mwargan committed Jul 14, 2022
1 parent 14122c7 commit 8b51b98
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,19 @@ public function mixedParam(Request $request)
```
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.

## Creating a ClassController with Laravel Artisan
First, make sure you publish the stubs with the following command below:

```bash
php artisan vendor:publish --provider="MMedia\ClassController\ClassControllerServiceProvider" --tag=stubs
```

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:

```bash
php artisan make:controller --type=class Test
```

## In detail

### Responses
Expand Down

0 comments on commit 8b51b98

Please sign in to comment.