Search code examples
phplaravellaravel-7

Laravel Route List (php artisan route:list) Displaying Middleware on New Lines


I have noticed recently a change in the way that my Laravel project is rendering the route list in the terminal. It is no longer comma separating the middleware column, and if there is more than one middleware it will add it to a new blank row in the table underneath its parent route.

This may seem like a very trivial problem, however being relatively new to laravel and this being my first proper project I have been producing with it I am firstly concerned that there could be an issue with the laravel install somehow that may cause other issues elsewhere, and the more routes I add with various middleware, the table when displaying all routes is becoming rather difficult to interoperate, where this was not an issue before.

See below a screenshot of the route table filtered to show only a select number of the routes in my project in order to give you an idea of what I am seeing.

Route table

Would anyone know why this has changed, and if there is a way to get it back to displaying it as it was before, by keeping all the middleware on the row with all the other data, and comma separating them.

On a whim, I have tried the following in the console, and they have made no difference:

php artisan cache:clear php artisan routes:clear php artisan config:clear

To be clear, what I expect to see is something like this:

Route table


Solution

  • I have since been informed that Laravel updated this a few days ago in their framework:

    https://github.com/laravel/framework/pull/32993

    It was as a result of this issue being raised:

    https://github.com/laravel/framework/issues/33041