Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

Code Examples of invokable controllers

Discover how to use Laravel's invokable controllers method in real-world applications. Browse 5 examples from popular open-source projects.

5 examples
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.

pterodactyl/panel

  • 8314
  • Created Dec 2016
  • Updated Nov 2025

Files in this example

  • app/Http/Controllers/Admin/Nodes/SystemInformationController.php
    • routes/admin.php
View full example

bytefury/crater

  • 8213
  • Created Nov 2019
  • Updated Aug 2024

Files in this example

  • routes/web.php
    • app/Http/Controllers/V1/Invoice/InvoicePdfController.php
View full example

christophrumpel/larastreamers

  • 238
  • Created May 2021
  • Updated Oct 2025

Files in this example

  • app/Http/Controllers/PageHomeController.php
    • routes/web.php
View full example

driesvints/driesvints.com

  • 74
  • Created May 2020
  • Updated Nov 2025

Files in this example

  • app/Http/Controllers/PostController.php
    • routes/web.php
View full example

Gummibeer/gummibeer.de

  • 11
  • Created May 2020
  • Updated Oct 2025

Files in this example

  • app/Http/Controllers/Blog/IndexController.php
    • routes/web.php
View full example

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.