Unable to guess the mime type as no guessers are available Laravel 5.2
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'],