Skip to content

Commit

Permalink
[Update] Universal Link
Browse files Browse the repository at this point in the history
- Added MyAnimeList people endpoint support
- Added MyAnimeList character endpoint support
  • Loading branch information
kiritokatklian committed Jun 28, 2024
1 parent 594480c commit 63a7d97
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions routes/Web/MyAnimeList.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?php

use App\Livewire\Anime\Details as AnimeDetails;
use App\Livewire\Character\Details as CharacterDetails;
use App\Livewire\Manga\Details as MangaDetails;
use App\Livewire\Person\Details as PersonDetails;

Route::prefix('/{mal_url}')
->where(['mal_url' => '^(www\.)?(myanimelist|mal)(.net)?'])
Expand All @@ -22,6 +24,20 @@
});
});

Route::prefix('/character')
->name('.character')
->group(function () {
Route::prefix('{character:mal_id}')
->name('.details')
->group(function () {
Route::get('/', CharacterDetails::class)
->name('.index');

Route::get('/{any}', CharacterDetails::class)
->name('.any');
});
});

Route::prefix('/manga')
->name('.manga')
->group(function () {
Expand All @@ -35,4 +51,18 @@
->name('.any');
});
});

Route::prefix('/people')
->name('.people')
->group(function () {
Route::prefix('{person:mal_id}')
->name('.details')
->group(function () {
Route::get('/', PersonDetails::class)
->name('.index');

Route::get('/{any}', PersonDetails::class)
->name('.any');
});
});
});

0 comments on commit 63a7d97

Please sign in to comment.