<?php Route::post('/image-upload', function (Request $request) { $request->validate([ 'image-upload' => 'required|image|mimes:jpeg,png,jpg|max:1024', ]); });
To get the dimension you can define it as follows (maximum width 1080px and height 600px).
'image-upload' => 'dimensions:max_width=1080,max_height=600'
Leave a reply