An example Laravel project to import YouTube playlist videos to database.
Prepared for a class in Professional Laravel course.
-
Clone the repository
git clone https://github.com/phpfour/youtube-playlist
-
Install composer dependencies and chromedriver
composer install vendor/bin/bdi detect drivers
-
Generate application key
php artisan key:generate
-
Migrate the database
php artisan migrate --seed
-
Run the console command with event name and playlist URL to import videos:
php artisan import:event-from-youtube "Laracon EU 2022" "https://www.youtube.com/playlist?list=PLMdXHJK-lGoBcH4il_bq-aD_p34ZrBlas"
-
The database will be populated with the videos from the playlist.