I have the following laravel package to generate Google XML sitemaps: http://ift.tt/1Usl8cu
It's setup like:
class SitemapsController extends Controller
{
public function all()
{
$pages = Page::where('active', '=', '1')->get();
foreach ($pages as $page) {
Sitemap::addTag(route('page.show', $page->slug), $page->updated_at, 'weekly', '0.8');
}
Sitemap::addTag(route('home'), date('Y-m-d'), 'weekly', '0.8');
return Sitemap::render();
}
}
So relatively simple. However every time a new page is added that should go onto the sitemap it gives me the following error:
[2016-01-05 07:53:25] local.ERROR: exception 'ReflectionException' with message 'Class App\Http\Controllers\SitemapsController does not exist' in /home/..../bootstrap/cache/compiled.php:1291
Thinking it was an issue with the package now downloading properly on composer, I did a composer update and there was an update for that package and it sorted it - however it's happened again and I think it's actually sorted when it regenerates the autoload files (which it does on a composer update). Any ideas how to sort this?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1OIEagH
via IFTTT
Aucun commentaire:
Enregistrer un commentaire