Basic authentication in Laravel route how-to

Basic authentication in Laravel route how-to

Sometimes you’d like to have very simple and basic authentication similar to HTTP basic authentication applied to a directory. For example you’d like to protect an API accessible under https://www.example.com/secret-api. Obviously when using Laravel routes...