App\Services\Html\FormBuilder::category PHP Méthode

category() public méthode

public category ( $subject, $type, array $options = [] ) : string
$options array
Résultat string
    public function category($subject, $type, array $options = []) : string
    {
        $categories = Tag::getWithType($type)->pluck('name', 'name')->toArray();
        $subjectCategory = $subject->tagsWithType($type)->first()->name ?? null;
        return $this->select("{$type}_tags[]", $categories, $subjectCategory, $options);
    }