kadegray / imdb-laravel
Import and use IMDB data in Laravel.
Requires
- laravel/framework: ^9.0|^10.0|^11.0|^12.0|^13.0
README
Imports IMDB's public movie title, genre, and rating datasets into your Laravel app's database, with migrations, Eloquent models, and artisan commands.
Installation
composer require kadegray/imdb-laravel
php artisan migrate
Import
Downloads title.basics.tsv.gz and title.ratings.tsv.gz from datasets.imdbws.com and imports movies (titles, genres, and ratings) into the imdb_titles and imdb_genres tables. Non-movie titles and adult content are skipped.
php artisan imdb:import
Options:
--fresh— re-download the source files even if already present.--limit=N— only process the first N data rows of each file (useful for local testing instead of waiting on the full ~11M-row dataset).--only=titles|ratings— run just the titles or just the ratings step.
Dump
Backs up the imdb_* MySQL tables to database/imdb-data-backups/. Requires a MySQL connection.
php artisan imdb:dump
If a mysqldump/mariadb-dump binary is found (checking $PATH and common Homebrew keg-only install locations), it's used for the dump. Otherwise, imdb:dump automatically falls back to a built-in, dependency-free PHP dump — no CLI tools required, just a slower dump for very large tables.