public function getGroup($group_id) { $attributes_group = \App\Models\AttributesGroupModel::find($group_id); if (!$attributes_group) { return 'Группа не найдена'; } return view('seller.attributes.group', $attributes_group->toArray()); }
public static function getAttributesGroups() { $user = \Auth::user(); if (!$user) { return []; } $attributes_groups = \App\Models\AttributesGroupModel::where('user_id', '=', $user->id)->get(); if (!$attributes_groups) { return []; } return $attributes_groups; }