In my laravel project, I have this snippet of my validator as
$this->validate($request,
['name'=>'required|unique:activities,name,'.$request->id,
'images.*'=>'image|max:65536',
'description'=>'required'
]
);
I want a maximum of 64 MB of images to be uploaded at a time. I have also set the max_upload_size and max_post_size equal to 64 MB in my php.ini file and also edited max_file_uploads to a safe high value.
Isn't it supposed to return a error message and redirect me to the previous message when I try to upload files above 64 MB??
But I get a message of PostTooLargeException with
public function handle($request, Closure $next)
{
$max = $this->getPostMaxSize();
if ($max > 0 && $request->server('CONTENT_LENGTH') > $max) {
throw new PostTooLargeException;
}
return $next($request);
}
Why is this happening?? Most answers direct me to edit php.ini file which I already did. How do I stop this from happening and safely redirect the user to the previous page with validation error messages??