skip to Main Content

Laravel – How to filter one collection with data from other collection?

On laravel I have 2 requests : $interviewers = Interviewer::get()->pluck('name', 'id'); $defaultInterviewers = UserMeetingInterviewer::getUserMeetingId($this->record->id)->get()->pluck('id'); How to leave in $interviewers only values which exists in $defaultInterviewers ? Sure I know how use foreach with new var, I mean methods from https://laravel.com/docs/10.x/helpers...…

VIEW QUESTION

Laravel private file serving pending problem

I save some photos privately in the storage and show them to the user when needed using the following method. in route : Route::get('/serveFile/{address?}', [FileController::class, 'serveFile']) ->where('address', '.*')->name('serveFile'); in controller : public function serveFile($address = null) { return response()->file(storage_path($address)); }…

VIEW QUESTION
Back To Top
Search