Skip to content

Commit

Permalink
Update AllowedMimeTypes.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Lithalroden committed May 13, 2024
1 parent 31ac709 commit b5e46a8
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/Media/AllowedMimeTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,22 +134,6 @@ public static function getValidationRule(string $type, bool $as_array = false, ?
return $as_array ? $rules : implode('|', $rules);
}

/**
* Get the validation rule for the given type of attachment
*
* @param string|null $type
* @return array
*/
public static function getAttachmentValidationRule(string $type = null): array
{
$rules = [
'nullable',
Rule::exists('media', 'id')->whereIn('mime_type', AllowedMimeTypes::getAllowedMimeTypes($type)),
];

return $rules;
}

/**
* Get the type from the mime type
* @param string $mime_type
Expand Down

0 comments on commit b5e46a8

Please sign in to comment.