I'm setting up an image upload option to a folder. What caused and how do I fix this error?
PHP in MessageController
public function store(Request $request)
{
$request->image->store('comments');
}
HTML
<form action="/api/messages" enctype="multipart/form-data" method="post">
Select image to upload:
<input id="fileToUpload" name="fileToUpload" type="file">
<input name="submit" type="submit" value="Upload Image">
</form>
I'm expecting output 200, but getting server error 500.