A
Size: a a a
A
v
v
A
A
v
OS
A
v
with(['category' => function($q){$q->select('id','name','slug’);}, ‘imageTmb’])->get(['name', 'slug','category_id’])->transform(fn($model) => $model->appends([‘imageTmb’]));
with(['category' => function($q){$q->select('id','name','slug’);}, ‘imageTmb’])->get(['name', 'slug','category_id’])->map(static function ($model) {
$modelAttributes = $model->toArray();
return $modelAttributes + [‘imageTmb’ => $model->imageTmb->toArray()];
});
OS
OS
A
Ф♪
ST
PL
Ф♪
Ф♪
ST