I have a route in my app/routes.php
i.e.
Route::get('sitemap', [
'as' => 'sitemap',
'uses' => 'PageController@sitemap'
]);
And sitemap.xml
in public/
folder.
When I hit the URL http://example.com/sitemap
it returns the content written in public/sitemap.xml
rather than executing a specified route from app/routes.php
Although, http://example.com/index.php/sitemap
works fine.
I need the standard solution for this.