ilbronza/formfield

1.0 2022-09-19 19:41 UTC

This package is auto-updated.

Last update: 2024-12-10 14:50:26 UTC


README

Latest Version on Packagist Total Downloads Build Status StyleCI

This is where your description should go. Take a look at contributing.md to see a to do list.

Installation

Via Composer

$ composer require ilbronza/formfield

Usage

Select or multiple fields

Set the possible values for a relation

Given a relation (ex. Categories) you can set the possible values for a select or multiple field with the following code to populate the select or multiple field options

public function getPossibleClientsValuesArray() : array
{
    return Category::select('name', 'id')->take(10)->pluck('name', 'id')->toArray();
}