A light weight Laravel package for simple operations with mp3 files
acekyd/laravelmp3 is a Laravel package for a light weight laravel package for simple operations with mp3 files.
It currently has 22 GitHub stars and 3.709 downloads on Packagist (latest version 1.0.3).
Install it with composer require acekyd/laravelmp3.
Discover more Laravel packages by acekyd
or browse all Laravel packages to compare alternatives.
Last updated
Laravel Package to help you work with mp3 files easily. Simple yet powerful. Built on the getID3
PHP 5.5+ or HHVM 3.3+, and Composer are required.
Via Composer
$ composer require acekyd/laravelmp3
Another alternative is to simply add the following line to the require block of your composer.json file.
"acekyd/laravelmp3": "1.*"
Then run composer install or composer update to download it and have the autoloader updated.
Add this to your providers array in config/app.php
// Laravel 5.2: config/app.php
'providers' => [
...
Acekyd\LaravelMP3\LaravelMP3ServiceProvider::class,
...
];
This package also comes with a facade
// Laravel 5: config/app.php
'aliases' => [
...
'LaravelMP3' => Acekyd\LaravelMP3\LaravelMP3Facade::class,
...
]
Laravel MP3 requires you to pass only one argument which is the filepath. Can be done during or after upload. Use it in your controllers to get the data you might need.
Add it to your controller if needed
use LaravelMP3;
$file = $request->file('music');
$details = LaravelMP3::getBitrate($file); //This returns the bitrate of the music file
The GPL License.