chiiya/laravel-tmdb

Laravel SDK for the TMDB API

Fund package maintenance!
chiiya

Installs: 42

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 1

Forks: 1

Open Issues: 3

pkg:composer/chiiya/laravel-tmdb

1.4.2 2025-09-21 16:28 UTC

README

TMDB PHP

A strongly-typed PHP SDK for the TMDB (The Movie Database) API, providing complete coverage of all non-user related APIv3 endpoints with full type safety and IDE autocompletion support.

Uses the Laravel HTTP client for making requests, allowing for easy fake responses in tests.

Index

> Installation
> Quickstart
> Changelog
> Contributing
> License

Installation

Install the package via Composer:

composer require chiiya/laravel-tmdb

Next, configure your TMDB API token in your .env file. This should be your API Read Access Token (v4 auth):

TMDB_API_TOKEN="eyJh..."

Quick Start

use Chiiya\Tmdb\Repositories\MovieRepository;
use Chiiya\Tmdb\Query\AppendToResponse;

class TmdbService {
    public function __construct(
        private MovieRepository $movies,
    )
    
    public function handle(): void
    {
        $this->movies->getMovie(550);
        $this->movies->getPopular();
        $movie = $this->movies->getMovie(550, [
            new AppendToResponse([
                AppendToResponse::IMAGES,
                AppendToResponse::WATCH_PROVIDERS,
            ]),
        ]);
        $movie->watch_providers['US']->flatrate[0]->provider_name;
    }
}

See tmdb-php for more examples and documentation.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

License

The MIT License (MIT). Please see License File for more information.