skip to Main Content

Not equal to function is not working in Laravel

Not equal to function is not working in below code when I am running it through Postman, but the same query is giving output in MySQL. Laravel Eloquent Code - Invoice::where('invoices.centre_code', $userInfo->centre_code) ->where("invoices.itemTotalPrice","<>", "invoices.paymentCollected") // this line is not working…

VIEW QUESTION

How can i delete old images in Laravel?

I want to remove old images in my public folder when he want to change him profile photo. ProfileController: if($request->hasFile('image')){ $request->validate([ 'image' => 'image|mimes:jpeg,png,jpg,svg|max:2048' ]); $imageName = $request->user()->id.'-'.time().'.'.$request->image->extension(); $request->image->move(public_path('users'), $imageName); $path = "users/".$imageName; $request->user()->image = $path; $request->user()->save(); } i tried…

VIEW QUESTION
Back To Top
Search