FEATURE #1550: add basic sitemap

Probably will not work, because Laravel prepends first line of document with some spaces or what. However maybe its just behavior on my localhost.
This commit is contained in:
Michal Kváček
2016-04-07 22:18:11 +02:00
parent 5bc077989f
commit 18ead80b5f
6 changed files with 143 additions and 44 deletions
+6 -2
View File
@@ -222,8 +222,8 @@ Route::group([
Route::post('settings', 'Settings@saveSettings')
->name('settings.save');
Route::get('search', 'Search@getSearch')->name('search');
Route::get('search', 'Search@getSearch')
->name('search');
// custom fields
// ------------------------------
@@ -267,6 +267,10 @@ Route::group(['middleware' => ['web']], function () {
Route::post('admin/login', 'Admin\Login@postLogin')
->name('login');
// route for sitemap
Route::get('sitemap.xml', 'Sitemap@getMap')
->name('sitemap');
// route for all content pages. This rule must be specified last (because it matches every route)
Route::get('{url}', 'Visitor\ContentPage@getPage')
->name('page.content');