Not a member? Signup now
$filePath = base_path('sitemap.xml');
For example:
$filePath = base_path('sitemap.xml'); if (file_exists($filePath)) { unlink($filePath); } $sitemap->store('xml', 'sitemap');