title: Laravel 8 - How to implement simple API key authentication
body: <p>I am trying to implement a very simple prototype (non-production) authentication system for my API in Laravel 8. My goal is for any user with the hard coded API key to be able to use the endpoints. Otherwise, they will get a 401 error at all endpoints. Users must include the API key as a URI parameter, with the format in the below example:</p>
  <p><code>'hostAddress'/api/endpoint1?apikey='APIkey'</code></p>
  <p>Where 'hostAddress' represents the host ipv6 address and 'APIkey' represents the hard coded API key.</p>
  <p>Every search I make for this problem leads me to the Laravel 8 documentation (<a href="https://laravel.com/docs/8.x/authentication" rel="nofollow noreferrer">https://laravel.com/docs/8.x/authentication</a>). However, the authentication solutions in the documentation are much more complex than what I am looking for.</p>
  <p>How I can implement this simple authentication system without the use of complex Laravel packages such as Passport and Sanctum?</p>