image mime types start with image/
so
if(substr($upload->getMimeType(), 0, 5) == 'image') {
// this is an image
}
xmazlan, mirkodzudzar liked this reply
There is also a validation rule: http://laravel.com/docs/validation#rule-image
thanks for both of you, is there a combination of the solution?
adding validation rule that will catch all images?
and barryvdh, all my projects have your debug bar!!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community