• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Unable to guess the mime type as no guessers are available Laravel 5.2

phplaravel


PHP Snippet 1:

<?php

namespace App\Support\Enum;

enum ImageExtension: string {
    case Png = 'png';
    case Jpg = 'jpg';
    case Jpeg = 'jpeg';

    /**
     * Return all values as array
     *
     * @return array
     */
    public static function values()
    {
        return array_map(
            fn(ImageExtension $imageExtension) => $imageExtension->value,
            self::cases()
        );
    }
}

PHP Snippet 2:

['image', 'mimes:' . implode(',', ImageExtension::values()), 'max:10000'],

Related Snippets

Image upload not working through ajax Laravel

Download & Save Zoom Recording in directory by PHP

Convert PHP array into HTML tag attributes separated by spaces

Laravel SQL query midnight time not showing

Elastic Beanstalk with Laravel Envoy

How to check user Permissions using Custom Middleware in Laravel

Laravel views are showing from cache on one server but works fine on other server

Best way to scrolldown onpageload

auth pages not getting css in laravel

insert multiple rows in a saveall in cakephp

How to make a foreign key not using primary key

Laravel - Implicit route model binding with soft deleted data

phpseclib 2.0 can not use Composer to create autoload

How to change the app environment at run time?

Last order would be re-order in wooCommerce. How is it possible?

About Contact Privacy policy Terms and conditions