Commit 00d64f54 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Merge branch 'revert-e1cfff84' into 'master'

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

System war so nicht mehr lauffähig. Bitte überprüfe dein Routing noch einmal
This reverts commit e1cfff84

See merge request !1
parents e1cfff84 e4bc4ddc
<?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