I currently have an API where it uploads a PDF to a lesson but I want to make the PDF upload nullable but it returns an error:
Error: Call to a member function store() on null in file C:\xampp\htdocs\drv-api\app\Http\Controllers\Api\LessonCRUDController.php on line 66
And this is my line 66:
$uploaded_files = $request->file->store('public/uploads/');
I want to make the PDF file upload nullable. Any help will be appreciated. Thank you!