<?php use Storage; $mimeType = Storage::mimeType('test.jpg');
How to get mime type in Laravel 9
4.4K
2 years ago
0 comments
In Laravel 9 you can make use of the "mimeType()" method that's available from the "Storage" facade. This method accepts the file path and will return the type as a string.
Previously in Laravel 8, you can make use "getMimeType()" but since Laravel 9 is using Flysystem 3.0 the method has changed since then.
Topics:
Frontend
Resource
Average
Average
Support Us
If you like our tutorial, support us by being our Patreon or buy us some coffee ☕️
Leave a reply