0

Is it possible to protect one!! laravel route with htaccess password?

I have a migrator route and that one should be accessed with a htaccess password

aynber
  • 22,380
  • 8
  • 50
  • 63
fefe
  • 8,755
  • 27
  • 104
  • 180

1 Answers1

1

You can try Laravel HTTP Basic Authentication to protect a route in a simple way:

Route::get('your-route', function () {
   // Only authenticated users may enter...
})->middleware('auth.basic');

Please note that, by default, this technique uses email and password stored in 'users' table to give access to an user.

Mochilo
  • 301
  • 1
  • 10