Daily Archives: 03/03/2020

Apply Middleware to Route

1. Create a middleware

2. Modify middleware MmeberInfo
To share logged in member data to all views in the group

3. Add this middleware to /app/Http/Kernel.php

4. Apply this middleware to route

After apply this middleware, every controller and view in the route group are able to access $member variable easily.

Reference: