Laravel Dynamic Robots serves a different robots.txt for each environment.
Create a directory, add one blade file per environment name, and the right rules are served on the
right host.
It removes a small but expensive class of mistake: a staging site indexed because it inherited production's robots file, or a production site quietly disallowing everything because it inherited staging's.
This site's robots.txt comes from it — bare in local, complete in production.
composer require sergeybruhin/dynamic-robots