]> git.localhorst.tv Git - alttp.git/blob - routes/web.php
update i18next
[alttp.git] / routes / web.php
1 <?php
2
3 use App\Http\Controllers\DiscordController;
4 use App\Http\Controllers\SitemapXmlController;
5 use App\Http\Controllers\TechniqueController;
6 use App\Models\Event;
7 use App\Models\Technique;
8 use Illuminate\Support\Facades\Route;
9
10 /*
11 |--------------------------------------------------------------------------
12 | Web Routes
13 |--------------------------------------------------------------------------
14 |
15 | Here is where you can register web routes for your application. These
16 | routes are loaded by the RouteServiceProvider within a group which
17 | contains the "web" middleware group. Now create something great!
18 |
19 */
20
21 Route::get('/sitemap.xml', [SitemapXmlController::class, 'index']);
22
23 Route::get('/dungeons/{name}', function($name) {
24         return app()->call('App\Http\Controllers\TechniqueController@web', ['type' => 'dungeon', 'name' => $name]);
25 });
26
27 Route::get('/locations/{name}', function($name) {
28         return app()->call('App\Http\Controllers\TechniqueController@web', ['type' => 'location', 'name' => $name]);
29 });
30
31 Route::get('/modes/{name}', function($name) {
32         return app()->call('App\Http\Controllers\TechniqueController@web', ['type' => 'mode', 'name' => $name]);
33 });
34
35 Route::get('/rulesets/{name}', function($name) {
36         return app()->call('App\Http\Controllers\TechniqueController@web', ['type' => 'ruleset', 'name' => $name]);
37 });
38
39 Route::get('/tech/{name}', function($name) {
40         return app()->call('App\Http\Controllers\TechniqueController@web', ['type' => 'tech', 'name' => $name]);
41 });
42
43 Route::view('/{path?}', 'app')->where('path', '.*');
44
45 Route::group(['prefix' => config('larascord.prefix'), 'middleware' => ['web']], function() {
46         Route::get('/callback', [DiscordController::class, 'handle'])
47                 ->name('larascord.login');
48
49         Route::redirect('/refresh-token', '/login')
50                 ->name('larascord.refresh_token');
51 });