formatting
This commit is contained in:
parent
c7bce2e829
commit
92593ca011
|
@ -92,14 +92,14 @@ If you would like to define a controller that only handles a single action, you
|
|||
}
|
||||
}
|
||||
|
||||
Using the `make:controller` Artisan command, we can quickly create such a controller:
|
||||
|
||||
php artisan make:controller ShowProfile --invokable
|
||||
|
||||
When registering routes for single action controllers, you do not need to specify a method:
|
||||
|
||||
Route::get('user/{id}', 'ShowProfile');
|
||||
|
||||
You may generate an invokable controller by using the `--invokable` option of the `make:controller` Artisan command:
|
||||
|
||||
php artisan make:controller ShowProfile --invokable
|
||||
|
||||
<a name="controller-middleware"></a>
|
||||
## Controller Middleware
|
||||
|
||||
|
|
Loading…
Reference in New Issue