Commit e4bc4ddc authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Revert "Changes to the routing system, so that it routes every page using PageController…"

This reverts commit e1cfff84
parent e1cfff84
<?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
class PageController extends Controller
{
/**
* Load Startpage accordingly to the given URL-Parameter and Mobile
*
* @param int $id
* @return Response
*/
public function loadStartPage($locale = "de") {
\App::setLocale($locale);
return view('index', [ 'title' => 'MetaGer: Sicher suchen & finden, Privatsphäre schützen']);
}
public function loadSubPage($locale = "de", $page = "datenschutz") {
\App::setLocale($locale);
return view('$page', [ 'title' => 'MetaGer: Sicher suchen & finden, Privatsphäre schützen']);
}
}
\ No newline at end of file
......@@ -12,18 +12,7 @@
*/
# Unsere Startseite. Hier fängt alles an
Route::get('{locale?}',
[ 'uses' => 'PageController@loadStartPage']
)
->where('locale', '[a-z]{1,2}');
# Unsere Startseite. Hier fängt alles an
Route::get('/{locale?}/{page}',
[ 'uses' => 'PageController@loadSubPage']
)
->where('locale', '[a-z]{1,2}');
Route::get('/{locale?}', [ 'uses' => 'StartpageController@loadStartPage']);
# Unsere MetaGer Suche!!
Route::get('/meta/meta.ger3',
[ 'uses' => 'MetaGerSearch@forwardToServer' ]
);
Route::get('/meta/meta.ger3', [ 'uses' => 'MetaGerSearch@forwardToServer' ]);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment