A Laravel Package for consuming Jikan API (currently v4).
composer require eliabrian/laravel-jikan
All of the models implemetation are pretty much the same (Anime, Manga, Characters, etc).
use Eliabrian\LaravelJikan\Facades\Anime;
$results = Anime::search([
'q' => 'Demon Slayer',
'type' => 'tv',
'sfw' => true,
'limit' => 1,
])->get();
use Eliabrian\LaravelJikan\Facades\Anime;
$anime = Anime::id(20)->get();
use Eliabrian\LaravelJikan\Facades\Anime;
$animeCharacters = Anime::id(20)->type('characters')->get();
$animePictures = Anime::id(20)->type('pictures')->get();
Type for different model might be differ. For more types you can look it up in Jikan Docs.
use Eliabrian\LaravelJikan\Facades\Anime;
use Eliabrian\LaravelJikan\Facades\Manga;
$randomAnimes = Anime::random()->get();
$randomMangas = Manga::random()->get();
use Eliabrian\LaravelJikan\Facade\Anime;
$topAnimes = Anime::top()->get();
// You can also add query parameters into it:
$topUpcomingAnimes = Anime::top([
'type' => 'tv',
'filter' => 'upcoming',
'limit' => '5',
])->get();