Download the PHP package bjthecod3r/laravel-tmdb without Composer

On this page you can find all versions of the php package bjthecod3r/laravel-tmdb. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-tmdb

Tests Latest Stable Version Total Downloads

Laravel TMDB

A fluent, fully-typed Laravel wrapper for The Movie Database (TMDB) API.

Supports Laravel 11, 12 and 13 on PHP 8.2+.

Installation

Publish the config file (optional):

Configuration

Add your credentials to .env. The package prefers the v4 Read Access Token (sent as a Bearer header); if it is absent it falls back to the classic v3 API key (sent as an api_key query parameter).

You can find both credentials under Settings → API in your TMDB account.

Usage

The Tmdb facade exposes one accessor per endpoint group. Calls return typed Paginated wrapper. Every method accepts an optional $params array for extra TMDB query parameters (page, append_to_response, region, …).

Movies

TV

People

Search

Search and discover requests send the configured TMDB_INCLUDE_ADULT default as include_adult; pass ['include_adult' => 'true'] to override per call.

Discover

discover() returns a fluent builder; call get() to execute.

Trending

Genres & Configuration

Resources

Endpoint methods return typed objects (Movie, TvShow, Person, …) with documented properties — your IDE autocompletes them and dates come back as CarbonImmutable instances:

Every resource also keeps the raw TMDB payload. Any field — even one not mapped to a typed property — is reachable via property access, array access, get() (dot notation supported), and toArray() / jsonSerialize():

Pagination

List endpoints return a Paginated wrapper that is iterable and JSON-serializable:

Image URLs

TMDB resources expose relative image paths. Build absolute URLs with the image() helper (sizes come from Tmdb::configuration()->details()):

The CDN root defaults to https://image.tmdb.org/t/p/ and can be changed via TMDB_IMAGE_BASE_URL (config key image_base_url).

Error handling

Failed requests throw typed exceptions, all extending TmdbException:

Exception When
AuthenticationException 401 — invalid/missing credentials
ResourceNotFoundException 404 — unknown resource
ValidationException 400 / 422 — invalid request
RateLimitException 429 — exposes ->retryAfter (seconds)
ApiException connection errors and unexpected 5xx

If neither credential is configured, an AuthenticationException is thrown before any request is sent.

Rate-limit (429) and 5xx responses to GET requests are retried automatically per the retry config before the exception is thrown, honouring the TMDB Retry-After header when present. Write requests (POST/DELETE) are never retried, since they are not idempotent.

Dependency injection

The facade is convenient, but you can also type-hint the manager or the underlying client:

An escape hatch for endpoints not yet wrapped:

Testing

Because the client is built on Laravel's Http facade, you can fake TMDB in your own app's tests:

The package's own suite:

License

The MIT License (MIT). See LICENSE.md.


All versions of laravel-tmdb with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/contracts Version ^11.0 || ^12.0 || ^13.0
illuminate/http Version ^11.0 || ^12.0 || ^13.0
illuminate/support Version ^11.0 || ^12.0 || ^13.0
nesbot/carbon Version ^2.72 || ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bjthecod3r/laravel-tmdb contains the following files

Loading the files please wait ...