Level 1
I solved it!
The problem was in the form.
When I use a <button type='submit'> instead of <input type='submit'> it works!
1 like
Im getting an error when I try to upload a file:
Call to a member function getSize() on null
public function uploadAssesment(Request $request, Course $course)
{
$file = $request->bestand;
}
<form action="/upload/assesment/{{$course->id}}" method="POST" enctype="multipart/form-data">
@csrf
<input type="hidden" name="id" value="{{$test->id}}">
<input type="file" name="bestand">
<input type="submit">
</form>
I solved it!
The problem was in the form.
When I use a <button type='submit'> instead of <input type='submit'> it works!
Please or to participate in this conversation.