I already configured php.ini file (post_max_size=10240M), but it\'s still throwing PostTooLargeException. How to increase upload and download limit in Laravel 5.5?
1) If you change the post_max_size from php.ini and restart the apache server but after does not get proper response then you have temp solution.
Handle the
illuminate-http-exceptions-posttoolargeexception
exception
public function render($request, Exception $exception)
{
if ($exception instanceof \Illuminate\Http\Exceptions\PostTooLargeException) {
return redirect()->back()->withErrors(['File size is too large']);
}
return parent::render($request, $exception);
}
and display the error in your view file
@if ($errors->any())
@foreach ($errors->all() as $error)
{{ $error }}
@endforeach
@endif