Download the PHP package sukohi/mime-db without Composer
On this page you can find all versions of the php package sukohi/mime-db. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download sukohi/mime-db
More information about sukohi/mime-db
Files in sukohi/mime-db
Download sukohi/mime-db
More information about sukohi/mime-db
Files in sukohi/mime-db
Vendor sukohi
Package mime-db
Short Description A Larave package to convert mime type to extension and vice versa.
License MIT
Package mime-db
Short Description A Larave package to convert mime type to extension and vice versa.
License MIT
Please rate this library. Is it a good library?
Informations about the package mime-db
MimeDb
A Larave package to convert mime type to extension and vice versa.
(This package is for Laravel 5+.)
- Note: This package is based on jshttp/mime-db. Thank you, jshttp!
Installation
Execute the following composer command.
composer require sukohi/mime-db:2.*
Register the service provider & alias in app.php
'providers' => [
...Others...,
Sukohi\MimeDb\MimeDbServiceProvider::class,
]
'aliases' => [
...Others...,
'MimeDb' => Sukohi\MimeDb\Facades\MimeDb::class,
]
Usage
Extension
$mime_type = 'image/png';
echo \MimeDb::getExtension($mime_type); // png
echo \MimeDb::getExtension($mime_type, 'default'); // with Default value
Multiple Extensions
$mime_type = 'image/png';
$extensions = \MimeDb::getExtensions($mime_type); // [jpeg, jpg, jpe]
$extensions = \MimeDb::getExtensions($mime_type, ['default']); // with Default value
Mime Type
$extension = 'mp4';
echo \MimeDb::getMimeType($extension); // video/mp4
echo \MimeDb::getMimeType($extension, 'default'); // with Default value
License
This package is licensed under the MIT License.
Copyright 2016 Sukohi Kuhoh
All versions of mime-db with dependencies
PHP Build Version
Package Version
Requires
laravel/framework Version
~5.0
The package sukohi/mime-db contains the following files
Loading the files please wait ....