Hi, just added some more functionality to the script, right now this script adding locales all routes, if you want to skip locales for some routes like admin or private i have created pull request for this here is link for pull request
How you can skip locales
download my repo code, if my request is not pulled in original repo.
open config/app.php find skip_locales or add config than add first segment of url you want to skip like following
'skip_locales' => ['admin','other']
now you can call URL with and without locales
www.yoursite.com/admin //without locale and www.yoursite.com/en/page-slug //with locale
All credit gose to @Marwelln author of this code here is link for original post