MW
Size: a a a
MW
AE
EK
AE
AE
ЮМ
M
А
public function services()
{
return $this->belongsToMany(Service::class)->withPivot('price');
}
$employees = Employee::inRandomOrder()->where('enabled', 1)->with('services')->get();
A
А
A
A
А
А
А
$employees = Employee::inRandomOrder()->where('enabled', 1)->with(['services' => function ($query) {
$query->whereNotNull('price');
}])->get();
А
А
А
А
А