All notable changes to laravel-html
will be documented in this file.
- fix: Passing null to parameter #1 ($string) of type string is deprecated by @francoism90 in #244
Full Changelog: https://github.com/spatie/laravel-html/compare/3.11.0...3.11.1
- Add some attributes by @francoism90 in #239
- @francoism90 made their first contribution in #239
Full Changelog: https://github.com/spatie/laravel-html/compare/3.10.1...3.11.0
- Fix value omitted when input created with no name by @raveren in #235
- Fix value omitted when input created with no name by @raveren in #236
- Fix for Select and model's relationships by @nikosv in #237
- @nikosv made their first contribution in #237
Full Changelog: https://github.com/spatie/laravel-html/compare/3.10.0...3.10.1
- Update docs for name attribute by @bskl in #225
- Add Conditionable trait: now
->when()
helper is available on all elements by @raveren in #234
Full Changelog: https://github.com/spatie/laravel-html/compare/3.9.0...3.10.0
Full Changelog: https://github.com/spatie/laravel-html/compare/3.8.0...3.9.0
- Add autocomplete attribute helper to the form element by @raveren in #221
- Added support for Htmlable contents in BaseElement by @hemmesdev in #215
- Register Service Provider in Laravel 11 by @gqrdev in #224
- Add name attribute to form element by @bskl in #223
Full Changelog: https://github.com/spatie/laravel-html/compare/3.7.0...3.8.0
- Fix return value in docs in element-methods.md by @raveren in #218
- Add autocomplete attribute helper to input, select and textarea by @raveren in #219
- Fix link with version in documentation by @fey in #217
Full Changelog: https://github.com/spatie/laravel-html/compare/3.6.0...3.7.0
- Laravel 11.x Compatibility by @laravel-shift in #214
Full Changelog: https://github.com/spatie/laravel-html/compare/3.5.0...3.6.0
- Fix docblock to solve phpstan errors when passing an array to html()->div() by @SanderMuller in #210
- Documentation on how to extend the package by @azamtav in #204
Full Changelog: https://github.com/spatie/laravel-html/compare/3.3.0...3.4.0
- Add documentation for new FormElement::route() method by @miken32 in #190
- Update
.gitattributes
by @totoprayogo1916 in #194 - Correction to docs re: readonly vs isReadonly by @sgilberg in #195
- Get value from model with casts php native enum by @bskl in #203
- @totoprayogo1916 made their first contribution in #194
- @sgilberg made their first contribution in #195
- @bskl made their first contribution in #203
Full Changelog: https://github.com/spatie/laravel-html/compare/3.2.2...3.3.0
- Allow setting a form action to a route by @miken32 in #189
- @miken32 made their first contribution in #189
Full Changelog: https://github.com/spatie/laravel-html/compare/3.2.1...3.2.2
- Convert all tests to Pest by @alexmanase in #183
- Laravel 10.x Compatibility by @laravel-shift in #184
- @alexmanase made their first contribution in #183
- @laravel-shift made their first contribution in #184
Full Changelog: https://github.com/spatie/laravel-html/compare/3.2.0...3.2.1
- Add
P
class to render paragraphs
- Allow Laravel 9
- Add compatiblity with PHP 8.1. The only breaking change with v2 is that
readonly
has been renamed toisReadonly
.
- Better support for numeric values in attributes
- Add
target
attribute method to links and button
- 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
0
values in inputs - Add
range
for range inputs - Format date and time values
- Prevent password fields to be filled
- Changed the
value
parameter indata
to 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
unless
method and magic__call
handler (e.g.$input->valueUnless(false, 5)
) - Added
size
attribute method toInput
- Added
name
attribute method toButton
- Fixed checkbox value repopulation after request
- Improve default of
tel
link
- Add support for Laravel 5.7
- Allow radio input check "0" value
- Correctly prefill form array attributes from the model
- Allow
null
children
- Revert comparison function change in
2.19.2
- Fixed comparison function for selected options in
Select
- Fixed
Html::radio
auto-generated id's & checked behaviour
- Changed
Input::require
to accept a boolean value
- Added
I
element class andHtml::i
factory method
- Added
Html::value
function that's a public method forold
- Added
Img
element class andHtml::img
factory method
- Removed
id
from CSRF fields
- Added
Input::date
andInput::time
- Added
Input::disabled
- Added
Form::novalidate
- Fixed Laravel 5.6 compatibility
- Added Laravel 5.6 compatibility
- Fixed an issue with checkbox values
- Add
readonly
method to input
- Fix
__call
when using macros
Htmlable
elements 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
required
method toSelect
- Added
required
method toTextarea
- Fixed a bug with values that are a
"0"
string
- Fixed a bug with values that are a
"0"
string
- Added a magic
__call
method 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::data
for data attributes
- Added
BaseElement::setChildren
to replace all children - Fixed a bug that didn't select options in optgroups when applying a value
- Added
BaseElement::style
for setting the style attribute (with a string or an associative array) - Added
Html::reset
for form reset buttons
- Nothing changed, but
2.2.0
was accidentally tagged as2.4.0
. This release contains the actual latest version at the time of writing.
- Added
checked
andunchecked
methods toInput
- Added
Optgroup
element - Added the ability to create optgroups in
Options
by passing an array of groups with options
- Added
Html::file
and aFile
element for file inputs
- Fixed an issue that stripped square brackets from element attributes
- Fixed the
Html
facade
- Minimum requirements have been reduced to PHP 7.0
- Added a
html()
helper function that returns an instance ofHtml
- Added
Macroable
to all elements andHtml
- Loosened type hints in method signatures for flexibility
- Added
Html::multiselect
method - Added
Select::multiple
method
- Added
class
method toHtml
- Added a
placeholder
method toTextarea
- Added an empty
value
toSelect::placeholder
- Added a
placeholder
method toSelect
for default empty values
- Added a
Html
facade
- 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
value
for a checkbox created withHtml::checkbox
- Fixed a case sensitivity issue with the
Textarea
class
- Initial release