Skip to content

Commit

Permalink
fillTo
Browse files Browse the repository at this point in the history
  • Loading branch information
asika32764 committed Jan 8, 2024
1 parent 0758dac commit 4b3fd45
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,15 @@ static function ($value) {
return $this;
}

public function fillTo(string $path, mixed $data, bool $decodeJson = true): static
{
$data = TypeCast::toArray($data);

$data = Arr::set([], $path, $data, '/');

return $this->fill($data, $decodeJson);
}

/**
* bind
*
Expand Down

0 comments on commit 4b3fd45

Please sign in to comment.