skip to Main Content

How to keep current file if the request doesn't have file in laravel?

I have this function that will update the data as showing below: public function update(Request $request, OutstandingPayment $outstandingPayment) { $request->validate([ 'file' => 'required|mimes:jpg,jpeg,png,csv,txt,xlx,xls,pdf|max:2048', 'payment_voucher_file_ref_no' => 'required|string', 'payment_voucher_date' => 'required|string', ]); if ($request->hasFile('file')) { $file_name = time().'_'.$request->file->getClientOriginalName(); $file_path = $request->file('file')->move(public_path('uploads/outstandingPayment'), $file_name);…

VIEW QUESTION

I cant import firebase

Hi I am trying in src>index.js ` import {initializeApp} from 'firebase/app' ` I am learning from a video. When the man in the video wrote this code, he wrote that it is being calculated next to him in green, but…

VIEW QUESTION
Back To Top
Search