Short information about Invokable controllers
These are also called "Single Action Controllers", where you have only one method __invoke() inside, and you attach the Route to the Controller:
Route::post('/server', ProvisionServer::class);
Read more in the official Laravel docs.
- app/Http/Controllers/V1/Invoice/InvoicePdfController.php
- routes/admin.php
- routes/web.php
- routes/web.php
- routes/web.php
Additional resources on Invokable controllers:
-
How does invokable controllers work?
Forum topic
laracasts.com
Published on
-
Invokable controller in non-default namespace
Forum topic
laracasts.com
Published on