All notable changes to laravel-html will be documented in this file.
- add support for PHP 8
- add the disabled method to all elements that support the attribute (#165)
- Add support for Laravel 8
- Internal refactor to normalize availabel attribute methods
- add Laravel 7 support
- Added number input
- Laravel 6 support
- Better handling for
0values in inputs - Add
rangefor range inputs - Format date and time values
- Prevent password fields to be filled
- Changed the
valueparameter indatato an optional parameter
- Added Laravel 5.8 support
- Dropped PHP 7.0 support
- Dropped Laravel 5.4 support
- Dropped PHPUnit 6 support
- use
Arr::andStr::functions
- Added
unlessmethod and magic__callhandler (e.g.$input->valueUnless(false, 5)) - Added
sizeattribute method toInput - Added
nameattribute method toButton - Fixed checkbox value repopulation after request
- Improve default of
tellink
- Add support for Laravel 5.7
- Allow radio input check "0" value
- Correctly prefill form array attributes from the model
- Allow
nullchildren
- Revert comparison function change in
2.19.2
- Fixed comparison function for selected options in
Select
- Fixed
Html::radioauto-generated id's & checked behaviour
- Changed
Input::requireto accept a boolean value
- Added
Ielement class andHtml::ifactory method
- Added
Html::valuefunction that's a public method forold
- Added
Imgelement class andHtml::imgfactory method
- Removed
idfrom CSRF fields
- Added
Input::dateandInput::time
- Added
Input::disabled
- Added
Form::novalidate
- Fixed Laravel 5.6 compatibility
- Added Laravel 5.6 compatibility
- Fixed an issue with checkbox values
- Add
readonlymethod to input
- Fix
__callwhen using macros
Htmlableelements can now be used in thehtml()method- Array notation is now implicitly converted to dot notation in
old(e.g.foo[1] -> foo.1)
- Fixed old values containing
0
- Added
requiredmethod toSelect
- Added
requiredmethod toTextarea
- Fixed a bug with values that are a
"0"string
- Fixed a bug with values that are a
"0"string
- Added a magic
__callmethod that responds to methods ending withIf, so any method can be called with a condition as it's first argument. The method will only be applied if the condition is truthy.
- Added
BaseElement::datafor data attributes
- Added
BaseElement::setChildrento replace all children - Fixed a bug that didn't select options in optgroups when applying a value
- Added
BaseElement::stylefor setting the style attribute (with a string or an associative array) - Added
Html::resetfor form reset buttons
- Nothing changed, but
2.2.0was accidentally tagged as2.4.0. This release contains the actual latest version at the time of writing.
- Added
checkedanduncheckedmethods toInput
- Added
Optgroupelement - Added the ability to create optgroups in
Optionsby passing an array of groups with options
- Added
Html::fileand aFileelement for file inputs
- Fixed an issue that stripped square brackets from element attributes
- Fixed the
Htmlfacade
- Minimum requirements have been reduced to PHP 7.0
- Added a
html()helper function that returns an instance ofHtml - Added
Macroableto all elements andHtml - Loosened type hints in method signatures for flexibility
- Added
Html::multiselectmethod - Added
Select::multiplemethod
- Added
classmethod toHtml
- Added a
placeholdermethod toTextarea
- Added an empty
valuetoSelect::placeholder
- Added a
placeholdermethod toSelectfor default empty values
- Added a
Htmlfacade
- Fixed an issue where html was escaped when you didn't want it to do that, like in buttons and links
- Added
Html::radio - Fixed an issue that set the wrong
valuefor a checkbox created withHtml::checkbox - Fixed a case sensitivity issue with the
Textareaclass
- Initial release