PHPackages                             evinkuraga/tmdb-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. evinkuraga/tmdb-laravel

ActiveLibrary[API Development](/categories/api)

evinkuraga/tmdb-laravel
=======================

This is a fork of the package php-tmdb/laravel. Instead of waiting for the maintainer to update the php-tmdb/api package to reflect the latest changes from the API, I've decided to fix these. These packages are actively used for http://flixi.com, which means these we will be most likely maintaining these with regular updates as the TMDB api integrates new changes. Original Description: Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

v2.3.1(5y ago)22431MITPHPPHP &gt;=7.2.0

Since Feb 27Pushed 5y ago1 watchersCompare

[ Source](https://github.com/evinkuraga/laravel)[ Packagist](https://packagist.org/packages/evinkuraga/tmdb-laravel)[ Docs](https://github.com/evinkuraga/laravel)[ RSS](/packages/evinkuraga-tmdb-laravel/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (7)Versions (67)Used By (0)

This is an updated fork from php-tmdb
=====================================

[](#this-is-an-updated-fork-from-php-tmdb)

This is a fork of the package php-tmdb/laravel. Instead of waiting for the maintainer to update the php-tmdb/api package to reflect the latest changes from the API, I've decided to fix these. These packages are actively used for , which means these we will be most likely maintaining these with regular updates as the TMDB api integrates new changes. Original Description: Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

Laravel Package for TMDB API Wrapper
====================================

[](#laravel-package-for-tmdb-api-wrapper)

[![License](https://camo.githubusercontent.com/e5bb5faf6e5b4e0594b874525adf01487108a86103ba16ff0b61dc56af83232d/68747470733a2f2f706f7365722e707567782e6f72672f7068702d746d64622f6c61726176656c2f6c6963656e73652e706e67)](https://packagist.org/packages/php-tmdb/laravel)[![Build Status](https://camo.githubusercontent.com/113325e0885e6b339e456a7df8a5f7ab2935cbd5462b6bdca0c04b3bb233e531/68747470733a2f2f7472617669732d63692e6f72672f7068702d746d64622f6c61726176656c2e737667)](https://travis-ci.org/php-tmdb/laravel)[![Code Coverage](https://camo.githubusercontent.com/c6ed17f4eccf32e93b738a8a3d17e12d171235330462db64647d09cd780e91fe/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7068702d746d64622f6c61726176656c2f6261646765732f636f7665726167652e706e67)](https://scrutinizer-ci.com/g/php-tmdb/laravel/)[![PHP & HHVM](https://camo.githubusercontent.com/66d97ed9673b06a01c52b304204be3a4818bee1d986ba2d0074ca4c7a2aeb8af/68747470733a2f2f7068702d6579652e636f6d2f62616467652f7068702d746d64622f6c61726176656c2f7465737465642e737667)](https://php-eye.com/package/php-tmdb/laravel)

A Laravel package that provides easy access to the [php-tmdb/api](https://github.com/php-tmdb/api) TMDB (The Movie Database) API wrapper. This package comes with a service provider that configures the `Tmdb\Client` and registers it to the IoC container. Both Laravel 5 and 4 are supported.

[![Latest Stable Version](https://camo.githubusercontent.com/883225199bc974e520dc8dbf3e04b10334ee7fc442fdc83875cac232c8bd238c/68747470733a2f2f706f7365722e707567782e6f72672f7068702d746d64622f6c61726176656c2f762f737461626c652e737667)](https://packagist.org/packages/php-tmdb/laravel)[![Latest Unstable Version](https://camo.githubusercontent.com/12304c1eec08a55b0fd8524ee881ce0935b207838c93fb4fb806267572dc0beb/68747470733a2f2f706f7365722e707567782e6f72672f7068702d746d64622f6c61726176656c2f762f756e737461626c652e737667)](https://packagist.org/packages/php-tmdb/laravel)[![Dependency Status](https://camo.githubusercontent.com/3501f99cad587b6d57d4bc6c0c8540fcd75c93ac294a485a4e52c230669ee1b0/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f7068702f7068702d746d64623a6c61726176656c2f62616467653f7374796c653d666c6174)](https://www.versioneye.com/php/php-tmdb:laravel)[![Total Downloads](https://camo.githubusercontent.com/4630a7c75a7c726e745b302a55236a42de7b8bda21b7511fd07e1fe724d60e82/68747470733a2f2f706f7365722e707567782e6f72672f7068702d746d64622f6c61726176656c2f646f776e6c6f6164732e737667)](https://packagist.org/packages/php-tmdb/laravel)

Looking for maintainers
-----------------------

[](#looking-for-maintainers)

*We are urgently looking for new mainteners of this library, we need someone that can steer this package in the right direction for the Laravel community, we do not currently have anybody on the `php-tmdb` team that uses laravel on a daily basis. We want the default standards to be met and unit tests to be available just to verify the part of the integration with the framework works. Send an email to `php-laravel@wtfz.net` if you are interested, or are willing to help out.*

Installation
------------

[](#installation)

Install Composer

```
$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer

```

Add the following to your require block in `composer.json` config

```
"evinkuraga/laravel": "~1.0"

```

or just run the following command in your project:

```
composer require evinkuraga/laravel

```

Configuration
-------------

[](#configuration)

Add to your `app/config/app.php` (Laravel 4) or `config/app.php` (Laravel &lt;5.5) the service provider:

```
'providers' => array(
    // other service providers

    'Tmdb\Laravel\TmdbServiceProvider',
)
```

Then publish the configuration file:

### Laravel 4

[](#laravel-4)

```
php artisan config:publish php-tmdb/laravel

```

### Laravel 5

[](#laravel-5)

```
php artisan vendor:publish --provider="Tmdb\Laravel\TmdbServiceProviderLaravel5"

```

Next you can modify the generated configuration file `tmdb.php` accordingly.

That's all! Fire away!

Usage
-----

[](#usage)

We can choose to either use the `Tmdb` Facade, or to use dependency injection.

### Facade example

[](#facade-example)

The example below shows how you can use the `Tmdb` facade. If you don't want to keep adding the `use Tmdb\Laravel\Facades\Tmdb;` statement in your files, then you can also add the facade as an alias in `config/app.php` file.

```
use Tmdb\Laravel\Facades\Tmdb; // optional for Laravel ≥5.5

class MoviesController {

    function show($id)
    {
        // returns information of a movie
        return Tmdb::getMoviesApi()->getMovie($id);
    }
}
```

### Dependency injection example

[](#dependency-injection-example)

```
use Tmdb\Repository\MovieRepository;

class MoviesController {

    private $movies;

    function __construct(MovieRepository $movies)
    {
        $this->movies = $movies;
    }

    function index()
    {
        // returns information of a movie
        return $this->movies->getPopular();
    }
}
```

### Listening to events

[](#listening-to-events)

We can easily listen to events that are dispatched using the Laravel event dispatcher that we're familiar with. The following example listens to any request that is made and logs a message.

```
use Log;
use Event;
use Tmdb\Event\TmdbEvents;
use Tmdb\Event\RequestEvent;

Event::listen(TmdbEvents::REQUEST, function(RequestEvent $event) {
    Log::info("A request was made to TMDB");
    // do stuff with $event
});
```

In Laravel 5 instead of using the `Event` facade we could also have used the `EventServiceProvider` to register our event listener.

### Image helper

[](#image-helper)

You can easily use the `ImageHelper` by using dependency injection. The following example shows how to show the poster image of the 20 most popular movies.

```
namespace App\Http\Controllers;

use Tmdb\Helper\ImageHelper;
use Tmdb\Repository\MovieRepository;

class WelcomeController extends Controller {

    private $movies;
    private $helper;

    public function __construct(MovieRepository $movies, ImageHelper $helper)
    {
        $this->movies = $movies;
        $this->helper = $helper;
    }

    /**
     * Show the application welcome screen to the user.
     *
     * @return Response
     */
    public function index()
    {
        $popular = $this->movies->getPopular();

        foreach ($popular as $movie)
        {
            $image = $movie->getPosterImage();
            echo ($this->helper->getHtml($image, 'w154', 260, 420));
        }
    }

}
```

The `Configuration` used by the `Tmdb\Helper\ImageHelper` is automatically loaded by the IoC container. If you are a Laravel 5.1 user you could also use the blade's `@inject` functionality,

```
@inject('image', 'Tmdb\Helper\ImageHelper')

@foreach ($movies as $movie)
    {!! $image->getHtml($movie->getPosterImage(), 'w154', 260, 420) !!}
@endforeach

```

### Registering plugins

[](#registering-plugins)

Plugins can be registered in a service provider using the `boot()` method.

```
namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Tmdb\HttpClient\Plugin\LanguageFilterPlugin;

class TmdbServiceProvider extends ServiceProvider {

    /**
     * Add a Dutch language filter to the Tmdb client
     *
     * @return void
     */
    public function boot()
    {
        $plugin = new LanguageFilterPlugin('nl');
        $client = $this->app->make('Tmdb\Client');
        $client->getHttpClient()->addSubscriber($plugin);
    }

    /**
     * Register services
     * @return void
     */
    public function register()
    {
        // register any services that you need
    }
}
```

**For all all other interactions take a look at [php-tmdb/api](https://github.com/php-tmdb/api).**

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 57.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~37 days

Recently: every ~141 days

Total

66

Last Release

2023d ago

Major Versions

v1.1.0 → v2.0.142016-03-09

v1.1.1 → v2.0.192017-09-09

v1.1.2 → v2.1.152018-05-30

v1.2.0 → v2.2.12018-11-09

v1.4.0 → 2.1.x-dev2020-10-26

PHP version history (4 changes)v1.0.0-ALPHA1PHP &gt;=5.3.2

v0.1PHP &gt;=5.4.0

v2.1.2PHP &gt;=5.6.0

v1.4.0PHP &gt;=7.2.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/0895278d07590e28317ad2b90140840b84afe8151d102e8f199183be58c154f1?d=identicon)[evinkuraga](/maintainers/evinkuraga)

---

Top Contributors

[![MarkRedeman](https://avatars.githubusercontent.com/u/1114829?v=4)](https://github.com/MarkRedeman "MarkRedeman (35 commits)")[![wtfzdotnet](https://avatars.githubusercontent.com/u/639376?v=4)](https://github.com/wtfzdotnet "wtfzdotnet (12 commits)")[![yukoff](https://avatars.githubusercontent.com/u/1076681?v=4)](https://github.com/yukoff "yukoff (9 commits)")[![z38](https://avatars.githubusercontent.com/u/3948085?v=4)](https://github.com/z38 "z38 (2 commits)")[![okaufmann](https://avatars.githubusercontent.com/u/4414498?v=4)](https://github.com/okaufmann "okaufmann (1 commits)")[![hiddeco](https://avatars.githubusercontent.com/u/10063039?v=4)](https://github.com/hiddeco "hiddeco (1 commits)")[![florentsorel](https://avatars.githubusercontent.com/u/1011503?v=4)](https://github.com/florentsorel "florentsorel (1 commits)")

---

Tags

phpapilaravelwrappermovietv showtvtvdbtmdb

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/evinkuraga-tmdb-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/evinkuraga-tmdb-laravel/health.svg)](https://phpackages.com/packages/evinkuraga-tmdb-laravel)
```

###  Alternatives

[php-tmdb/laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

16553.3k1](/packages/php-tmdb-laravel)[php-tmdb/api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

424378.6k16](/packages/php-tmdb-api)[dariusiii/tmdb-laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

1821.1k](/packages/dariusiii-tmdb-laravel)[wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

4282.9k](/packages/wtfzdotnet-php-tmdb-api)[php-tmdb/symfony

Symfony Bundle for TMDB (The Movie Database) API. Provides easy access to the php-tmdb/api library.

3649.7k](/packages/php-tmdb-symfony)[codebuglab/laravel-tmdb

Simple integration with TMDB ( The Movie Database ) API to retrieve their data.

145.5k](/packages/codebuglab-laravel-tmdb)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
