public function specifications()
{
return $this->belongsToMany(Specification::class)->withPivot(['value']);
}
return [
'item' => $item,
'item.specifications' => $item->specifications()->where('status', true)->get(['specification_id', 'value'])->toArray()
];
Field::group([
Select::make('specification_id')
->title(trans('base.main.category'))
->fromQuery(Specification::where('status', true), 'title', 'id')
->empty(trans('
base.not.select'), 0),
Input::make('value')
->type('text')
->title(trans('base.value'))
->max(255)
->required(),
]),