Laravel v12.4 introduces the AsHtmlString cast, allowing Eloquent attributes to be automatically cast to HTML strings. This simplifies the process by integrating the existing HtmlString class with Eloquent attributes. While useful for rendering dynamic content from databases, developers should be cautious about potential security risks, as HTML strings are not escaped in Blade templates.
Sort: