skip to Main Content

Combing multiple orWhere() in Laravel 9 Eloquent

Is it possible to combine multiple orWhere() inside one where()? E.g. The following: $query->where(function($query){ $query->where('text1', '=', $_GET['lorem']) ->orWhere('text2', '=', $_GET['lorem']) ->orWhere('text3', '=', $_GET['lorem']) ->orWhere('text4', '=', $_GET['lorem']); }); Would look something like this: $query->where(function($query){ $query->where(['text1' || 'text2' || 'text3' || 'text4'],…

VIEW QUESTION

What is wrong with this form validation – Laravel

I'm working with Laravel 5.8 and I have made this Controller method for creating some records inside the DB. public function doTheUpload(Request $request) { try{ $request->validate([ 'video' => 'nullable|mimes:mp4', 'video_thumb' => 'required|mimes:jpg,png,jpeg', 'video_name' => 'required', 'video_desc' => 'nullable', 'available_download' =>…

VIEW QUESTION
Back To Top
Search