public function select($label = 'Categoria', $groupSlug = '', $model = '') { if ($groupSlug == '') { dd('groupSlug indefinido'); } $categories = Category::where('group_slug', $groupSlug)->get()->lists('name', 'id'); $currentCategory = $model != '' ? $model->category_id : null; $currentCategory = Input::get('category_id') ?: null; $html = Form::control('select', 'category_id', $label, $currentCategory, [], $categories); return $html; }