> For the complete documentation index, see [llms.txt](https://tina-hammar.gitbook.io/tall-forms/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tina-hammar.gitbook.io/tall-forms/field/declaration.md).

# Declaration

### `::make vs ::blade`

In a [Standard form](/tall-forms/form/form-types/standard-form.md), [Modal](/tall-forms/form/form-types/modal.md) or [Without button](/tall-forms/form/form-types/without-buttons.md) forms, you use the `make()` method

```php
FooField::make(string $label, null|string $key = null)
```

In [Headless](/tall-forms/form/form-types/headless.md) or [Fields only](/tall-forms/form/form-types/untitled.md) forms you use the `blade()` method

```php
FooField::blade(
    string $label, 
    null|string $key = null, 
    string $wireId = '', 
    string $name = '', 
    string $id = ''
)
```

## Both ::make and ::blade params

### **`$label`**

*Required* The label to use for the form field, e.g. `First Name`.

### **`$key` (wire:model)**

*Optional.* The key to use for the form field. If null, it will use a snake cased `$label`. This parameter corresponds to the `$model` attribute and sets the **`wire:model`** attribute on the field.

Basic input example:

```php
 Input::make('First Name')->rules('required|min:2'),
```

Select field example

```php
$brand_options = Brand::orderBy('name')->pluck('id', 'name');

Select::make('Brand', 'brand_id')
    ->options($brand_options)
    ->rules(['required', Rule::exists('brands', 'id')])
```

## ::blade only params

### $id

*Optional.*  **The $id property overrides $wireId**. For [Headless](/tall-forms/form/form-types/headless.md) or [Fields only](/tall-forms/form/form-types/untitled.md) forms. Set the input html `id` attribute else, it will be auto-generated from the field `$key.`

```php
Input::blade(
    label: 'My input', 
    id: 'my-input-id'
)
```

### $wireId

*Optional.* **The $id property overrides $wireId**. For [Headless](/tall-forms/form/form-types/headless.md) or [Fields only](/tall-forms/form/form-types/untitled.md) forms. Pass the Livewire `$_instance->id` to get a component **unique** input html  `id`  else, it will be auto-generated from the field `$key.`

```php
Input::blade(
    label: 'My input', 
    wireId: $_instance->id,
)
```

### **$name**

*Optional.* For [Headless](/tall-forms/form/form-types/headless.md) or [Fields only](/tall-forms/form/form-types/untitled.md) forms. Set the input html `name` attribute else, it will be auto-generated from the field `$label.`

```php
Input::blade(
    label: 'My input', 
    name: 'my-input-name'
)
```
