Guard
trait Guard
Methods
bool
isMimeAllowed(array $allowedMime = [])
Check if mime is allowed or not
bool
isExtensionAllowed(array $allowedExtension = [])
Check if extension is allowed or not
bool
isLimitExceeded(int|string $maxSize)
File size limit check
bool
isValid()
get upload status
void
destroyIfFailed()
Destroy uploaded file if file have invalid condition
Details
at line 23
bool
isMimeAllowed(array $allowedMime = [])
Check if mime is allowed or not
at line 41
bool
isExtensionAllowed(array $allowedExtension = [])
Check if extension is allowed or not
at line 58
bool
isLimitExceeded(int|string $maxSize)
File size limit check
at line 74
bool
isValid()
get upload status
at line 85
void
destroyIfFailed()
Destroy uploaded file if file have invalid condition