πŸ”₯ Weekly thread #48 of 2021

πŸ”₯ This week's code tips for Laravel developers

🧡 A weekly thread

You can pass parameters to Laravel middleware classes

3

πŸ”₯ You can pass parameters to Laravel middleware classes

You can pass parameters to Laravel middleware classes

πŸ”₯ Remember that you can pass parameters to your custom @laravelphp middleware classes

This simple middleware allows me to inject onboarding screens in an Inertia app.

You can validate user input inside middleware

1

πŸ”₯ You can validate user input inside middleware

You can validate user input inside middleware

βœ” You can validate fields even within a middleware in Laravel.

This would help when you need to constantly validate the same field(s) on your requests:

We're writing a book, you can get it for free here.