Artisan command route: cache, serializes the results of Laravel app routes files into a bootstrap/cache/routes.php file. Laravel performing operation of parsing routes once and then storing those result into cache routes.php.
That’s it! Routes are being parsed from the cached file, not routes file. If you make any changes to routes files, now routing of your app won’t change until you re-cache. So, it is best practice to route cache on production website only not in development app.
𝗤𝘂𝗶𝗰𝗸 𝗟𝗮𝗿𝗮𝘃𝗲𝗹 𝗣𝗲𝗿𝗳𝗼𝗿𝗺𝗮𝗻𝗰𝗲 𝗧𝗶𝗽𝘀 𝗣𝗹𝗮𝘆𝗹𝗶𝘀𝘁: