Skip to content

Commit

Permalink
Add isset magic method and bump version.
Browse files Browse the repository at this point in the history
  • Loading branch information
kristijanhusak committed Dec 20, 2016
1 parent 5514157 commit 4aebb49
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 1.10.0
- Add `buttongroup` field type - #298 (Thanks to [@noxify](https://github.com/noxify))
- Allow custom `id` and `for` attributes for a field - #285
- Fix accessing fields from twig by adding `__isset` magic method - #301
- Use custom Form macro for labels in views

## 1.9.0
- Bump minimum php version to 5.6 - #276 (Thanks to [@max-kovpak](https://github.com/max-kovpak))
- Add support for Laravel 5.3 and fix EntityType lists method - #276 (Thanks to [@max-kovpak](https://github.com/max-kovpak))
Expand Down
10 changes: 10 additions & 0 deletions src/Kris/LaravelFormBuilder/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,16 @@ public function __get($name)
}
}

/**
* Check if field exists when fetched using magic methods
* @param $name
* @return bool
*/
public function __isset($name)
{
return $this->has($name);
}

/**
* Set the Event Dispatcher to fire Laravel events
*
Expand Down

0 comments on commit 4aebb49

Please sign in to comment.