rooxie/omdb-laravel

A Laravel integration for OMDb API

Installs: 20

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/rooxie/omdb-laravel

0.0.1 2022-06-15 21:12 UTC

This package is auto-updated.

Last update: 2025-12-04 13:35:14 UTC


README

Introduction

A Laravel integration of PHP wrapper for OMDb API.

Installation

Install omdb-laravel using Composer.

composer require rooxie/omdb-laravel

Quickstart

Add OMDb API key to your .env file

OMDB_API_KEY=xxxxxxx

Use OMDb as a facade

use Rooxie\Laravel\Facades\OMDb;

OMDb::getByImdbId('tt0110912');
OMDb::getByTitle('harry potter', 'movie', 2004);
OMDb::search('arrival', 'movie', 2016, 1);

Use from Laravel Service Container

use Rooxie\OMDb;

class UserController extends Controller
{
    public function show(OMDb $omdb, string $imdbId)
    {
         return view('user.profile', [
            'movie' => $omdb->getByImdbId($imdbId),
        ]);
    }
}

Documentation

Read the full documentation here.