Freek Van der Herten has a post for the Laravel users out there showing how to use custom HTML components in your Blade views making use of this package.
Today we launched our newest package called BladeX. In short this package provides you with an easy html like way to render custom html components in your Blade views. In this blogpost I'd like to introduce the package to you.
He starts by describing an example application where reusable components could be helpful (things like alert messages, form components and layout parts). He then shows how to create a component for an alert message that can be used via the @component
functionality in Blade as a sort of "include and use" call. He shows how to pass in variables, use slots, and prefix components. He wraps up the post going "under the hood" and showing how it works via a service provider and how they made the package (and why).