samedi 19 août 2017

Adding sitemap in laravel

I want to add a sitemap file in my laravel project. Currently I'm using laravel5.4. I have a sitemap xml file named "sitemap.xml" in the following path

"resources/views/user/" for site map i have a route as following

Route::get('/sitemap',function(){
    return response()->view('user.sitemap')
      ->header('Content-Type', 'xml');
});

but when I hit the route it gives the following error

InvalidArgumentException in FileViewFinder.php line 137: View [user.sitemap] not found.

the view file is located at user folder correctly then is there any problem in my procedure. Please Help. Check in this link:error link



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2va6qQP
via IFTTT

Aucun commentaire:

Enregistrer un commentaire