Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Krzysztof Grzelak committed Mar 18, 2024
1 parent 2e608a1 commit a274e55
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,23 @@
# laravel-form
# Html form helper for Laravel

## Installation
```bash
composer require kgrzelak/laravel-form
```

### Publish files
```bash
php artisan vendor:publish --provider="Kgrzelak\LaravelForm\LaravelFormServiceProvider"
```

## Usage example

```php
Form::input()
->setName('input-name')
->setType('text')
->setValue('input-value')
->setPlaceholder('input-placeholder')
->setClass('form-control')
->setAttributes(['readonly' => 'readonly']);
```
2 changes: 1 addition & 1 deletion src/Items/BaseItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function setType(string $type): static
return $this;
}

public function setValue(string $value): static
public function setValue(?string $value = null): static
{
$this->value = $value;

Expand Down

0 comments on commit a274e55

Please sign in to comment.