How to set custom attribute using eloquent using related model

How to set custom attribute using eloquent using related model

Hi i have a elloquent query like this

Hi i have a elloquent query like this

$partners = DeliveryPartner::where('active', 1)
    ->where('blocked', 0)
    ->whereHas('deliveryPartnerZipcodes', function ($query) use ($zip4pp) {
        $query->where('zipcode', $zip4pp);
    })
    ->with('deliveryPartnerImage')
    ->with(['deliveryPartnerTimes' => function($query) {
        //HERE I WANT TO SET A PROPERTY ON THE BASE COLLECTION USING INFO FROM THIS MODEL
    }])
    ->get();

In delivery times there are opening and closing times. Using these times i want to set a propery called "status" on the parent like $partent->status = somevalue based on de data from deliverypartner times

how can i do this ?

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Clear Cache in Laravel 6.8 App using Artisan Command Interface (CLI)

In Laravel 6 tutorial, we learn how to use PHP artisan command interface (CLI) to clear the cache from Laravel 6.8 application. How To Clear Cache in Laravel 6.8 Application using Artisan Command Line Interface (CLI)? How to clear route cache using php artisan command? How to easily clear cache in Laravel application? How to clear config cache in PHP Laravel via artisan command? How to clear Laravel view cache? How to Reoptimized class in Laravel via artisan CLI?

Get Weather Data with Laravel Weather

Get Weather Data with Laravel Weather. Laravel Weather is a good package which we can use to get weather data. It's a wrapper around Open Weather Map API (Current weather). A wrapper around Open Weather Map API (Current weather)

Laravel Sweet Alert | How to use the SweetAlert package in Laravel PHP

Sweet Alert is a laravel wrapper around #sweetalert javascript library for showing alert or notification message. This is a great package created by rashid, and this laravel package is very famous because it has tonnes of features you can choose from.