2017 © Pedro Peláez
 

library mime-db

A Larave package to convert mime type to extension and vice versa.

image

sukohi/mime-db

A Larave package to convert mime type to extension and vice versa.

  • Tuesday, January 31, 2017
  • by Sukohi
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

MimeDb

A Larave package to convert mime type to extension and vice versa.
(This package is for Laravel 5+.), (*1)

Installation

Execute the following composer command., (*2)

composer require sukohi/mime-db:2.*

Register the service provider & alias in app.php, (*3)

'providers' => [
    ...Others...,  
    Sukohi\MimeDb\MimeDbServiceProvider::class,
]

'aliases' => [
    ...Others...,  
    'MimeDb' => Sukohi\MimeDb\Facades\MimeDb::class,
]

Usage

Extension, (*4)

$mime_type = 'image/png';
echo \MimeDb::getExtension($mime_type);    // png

echo \MimeDb::getExtension($mime_type, 'default');    // with Default value

Multiple Extensions, (*5)

$mime_type = 'image/png';
$extensions = \MimeDb::getExtensions($mime_type);    // [jpeg, jpg, jpe]

$extensions = \MimeDb::getExtensions($mime_type, ['default']);    // with Default value

Mime Type, (*6)

$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., (*7)

Copyright 2016 Sukohi Kuhoh, (*8)

The Versions

31/01 2017

2.0.x-dev

2.0.9999999.9999999-dev

A Larave package to convert mime type to extension and vice versa.

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi

31/01 2017

dev-master

9999999-dev

A Larave package to convert mime type to extension and vice versa.

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi

31/01 2017

2.0.1

2.0.1.0

A Larave package to convert mime type to extension and vice versa.

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi

14/06 2016

2.0.0

2.0.0.0

A Larave package to convert mime type to extension and vice versa.

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi