From 8b51b98547229c845906126e54ba876efc3da757 Mon Sep 17 00:00:00 2001 From: Michal Date: Thu, 14 Jul 2022 07:44:15 +0000 Subject: [PATCH] Readme updates --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index ecf7fbe..b442ced 100644 --- a/README.md +++ b/README.md @@ -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