If you are utilizing Laravel as a backend platform serving API routes via a subdomain https://api.example.com/
, you may find that the default routing configuration for the api route is not needed.
Edit /app/Providers/RouteServiceProvider.php
and locate the prefix('api')
line and comment it out or remove it altogether, in my case i don't need the web route group so i commented that part out.
<?php
namespace App\Providers;
use Illuminate\Cache\RateLimiting\Limit;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;