routes.php 5.87 KB
Newer Older
Dominik Hebeler's avatar
Dominik Hebeler committed
1
2
3
4
5
6
7
8
9
10
11
<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
12
 */
karl's avatar
karl committed
13

14
15
16
17
18
19
20
Route::group(
    [
        'prefix' => LaravelLocalization::setLocale(), /*,
    'middleware' => [ 'localeSessionRedirect', 'localizationRedirect' ]*/
    ],
    function () {
        /** ADD ALL LOCALIZED ROUTES INSIDE THIS GROUP **/
21

22
        Route::get('/', 'StartpageController@loadStartPage');
Dominik Hebeler's avatar
Dominik Hebeler committed
23

24
        Route::get('img/piwik.png', 'ImageController@generateImage');
Dominik Hebeler's avatar
Dominik Hebeler committed
25

26
27
28
29
30
31
32
33
34
        Route::get('impressum', function () {
            return view('impressum')
                ->with('title', trans('titles.impressum'))
                ->with('css', 'impressum.css')
                ->with('navbarFocus', 'kontakt');
        });
        Route::get('impressum.html', function () {
            return redirect(url('impressum'));
        });
35

36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
        Route::get('about', function () {
            return view('about')
                ->with('title', trans('titles.about'))
                ->with('css', 'about.css')
                ->with('navbarFocus', 'kontakt');
        });
        Route::get('team', function () {
            return view('team.team')
                ->with('title', trans('titles.team'))
                ->with('css', 'team.css')
                ->with('navbarFocus', 'kontakt');
        });
        Route::get('team/pubkey-wsb', function () {
            return view('team.pubkey-wsb')
                ->with('title', trans('titles.team'))
                ->with('navbarFocus', 'kontakt');
        });
53

54
55
56
57
58
59
60
        Route::get('kontakt', function () {
            return view('kontakt.kontakt')
                ->with('title', trans('titles.kontakt'))
                ->with('css', 'kontakt.css')
                ->with('js', ['openpgp.min.js', 'kontakt.js'])
                ->with('navbarFocus', 'kontakt');
        });
Dominik Hebeler's avatar
Dominik Hebeler committed
61

62
        Route::post('kontakt', 'MailController@contactMail');
63

64
65
66
67
68
69
70
71
72
73
74
        Route::get('tor', function () {
            return view('tor')
                ->with('title', 'tor hidden service - MetaGer')
                ->with('navbarFocus', 'dienste');
        });
        Route::get('spende', function () {
            return view('spende.spende')
                ->with('title', trans('titles.spende'))
                ->with('css', 'donation.css')
                ->with('navbarFocus', 'foerdern');
        });
75
        Route::get('spende/danke/{data}', ['as' => 'danke', function ($data) {
76
77
78
79
80
            return view('spende.danke')
                ->with('title', trans('titles.spende'))
                ->with('css', ['donation.css', 'danke.css'])
                ->with('navbarFocus', 'foerdern')
                ->with('data', unserialize(base64_decode($data)));
81
        }]);
82
83
84
85
86
87
        Route::get('partnershops', function () {
            return view('spende.partnershops')
                ->with('title', trans('titles.partnershops'))
                ->with('navbarFocus', 'foerdern')
                ->with('css', 'partnershops.css');
        });
88

89
90
91
92
93
94
        Route::get('beitritt', function () {
            return view('spende.beitritt')
                ->with('title', trans('titles.beitritt'))
                ->with('css', 'beitritt.css')
                ->with('navbarFocus', 'foerdern');
        });
95

96
97
98
99
100
101
102
103
        Route::get('bform1.htm', function () {
            return redirect('beitritt');
        });
        Route::get('spendenaufruf', function () {
            return view('spende.spendenaufruf')
                ->with('title', 'Spendenaufruf - MetaGer')
                ->with('navbarFocus', 'foerdern');
        });
104

105
        Route::post('spende', 'MailController@donation');
106

107
108
109
110
111
112
        Route::get('datenschutz', function () {
            return view('datenschutz')
                ->with('title', trans('titles.datenschutz'))
                ->with('css', 'privacy.css')
                ->with('navbarFocus', 'datenschutz');
        });
Dominik Hebeler's avatar
Dominik Hebeler committed
113

114
115
116
117
        Route::get('hilfe', function () {
            return view('hilfe')
                ->with('title', trans('titles.hilfe'))
                ->with('css', 'help.css')
118
119
120
121
122
123
124
125
126
				->with('navbarFocus', 'hilfe');
		});

		Route::get('faq', function()
		{
			return view('faq')
				->with('title', trans('titles.faq'))
				->with('css', 'help.css')
				->with('navbarFocus', 'hilfe');
127
        });
128

129
        Route::get('widget', function () {
130
            return view('widget.widget')
131
132
133
                ->with('title', trans('titles.widget'))
                ->with('css', 'widget.css')
                ->with('navbarFocus', 'dienste');
karl's avatar
karl committed
134
        });
135
136
137

        Route::get('sitesearch', 'SitesearchController@loadPage');

138
        Route::get('websearch', function () {
139
140
            return view('widget.websearch')
                ->with('title', trans('titles.websearch'))
141
142
                ->with('css', 'websearch.css')
                ->with('navbarFocus', 'dienste');
143
144
        });

145
        Route::get('admin', 'AdminInterface@index');
146
147
        Route::get('admin/count', 'AdminInterface@count');
        Route::get('admin/check', 'AdminInterface@check');
Dominik Hebeler's avatar
Dominik Hebeler committed
148

149
        Route::get('settings', 'StartpageController@loadSettings');
karl's avatar
karl committed
150

151
152
153
154
155
        Route::get('meta/meta.ger3', 'MetaGerSearch@search');
        Route::get('meta/picture', 'Pictureproxy@get');
        Route::get('clickstats', 'LogController@clicklog');
        Route::get('pluginClose', 'LogController@pluginClose');
        Route::get('pluginInstall', 'LogController@pluginInstall');
156

157
158
159
160
161
162
163
        Route::get('qt', 'MetaGerSearch@quicktips');
        Route::get('tips', 'MetaGerSearch@tips');
        Route::get('/plugins/{params}/opensearch.xml', 'StartpageController@loadPlugin');
        Route::get('owi', function () {
            return redirect('https://metager.de/klassik/en/owi/');
        });
    });