Looking to hire Laravel developers? Try LaraJobs

laravel-tmdb maintained by chiiya

Description
Laravel SDK for the TMDB API
Author
Last update
2025/09/21 18:28 (dev-master)
License
Downloads
311
Tags

Comments
comments powered by Disqus

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

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.