I have a sitemap.xml file in my view folder and this is the route:
Route::get('sitemap.xml',function() {
return response()->view('sitemap')
->header('Content-Type', 'xml');
});
But when i search mydomainname.com/sitemap.xml. It returns InvalidArgumentException View [sitemap] not found.
I tried to search on google and youtube but not able to find any solution.