Laravel 5.1 Pass middleware parameters as array

Great functionality!

Ahesanali Suthar

Laravel has added support for middleware parameter since version 5.1 . So it is nice that we can pass middleware parameter from Routes.php or from controller. Let’s see an example.

or in controller constructor


and in middleware handle function you can catch argument which is passed as mentioned below:

View original post 116 more words

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s