• 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

Show rotation of tweets using current day of month

Target class controller does not exist - Laravel 8

Magento Installation SQLSTATE[HY000] [2002] No such file or directory error

str_word_count() function doesn't display Arabic language properly

wp_remote_get() not passing authentication

Adding Multiple Custom Post Types in Wordpress

500 (Internal Server Error) with Laravel & Docker [duplicate]

PHP to search within txt file and echo the whole line

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given [duplicate]

Laravel insert dynamic input values with radio button

PHPUnit 7: Failed asserting that exception of type InvalidArgumentException is thrown

api response laravel doesn't show

Why rand() every time I refresh the page?

Normalize DateInterval in PHP

Add and update products to session cart in Laravel

About Contact Privacy policy Terms and conditions