百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
L

laravel-blade-x

> 后端框架
开源

在 Blade 视图中使用自定义 HTML 组件

518 stars0 点赞3 次浏览
访问官网GitHub

工具介绍

在 Blade 视图中使用自定义 HTML 组件

Notice

We have abandoned this package because Laravel 7 introduced native support for Blade-X style components.

Only use this package if you're on Laravel 6 or below.

When upgrading to Laravel 7 you should convert your Blade X components to native Laravel Blade components

Supercharged Blade components

This package provides an easy way to render custom HTML components in your Blade views.

Here's an example. Instead of this

blade

My view

@include('myAlert', ['type' => 'error', 'message' => $message])

you can write this:

blade

My view

You can place the content of that alert in a simple Blade view that needs to be registered before using the my-alert component.

blade
{{-- resources/views/components/myAlert.blade.php --}}

Installation

You can install the package via Composer:

bash
composer require spatie/laravel-blade-x

The package will automatically register itself.

Documentation

You'll find the documentation on https://docs.spatie.be/laravel-blade-x/v2/introduction.

Find yourself stuck using the package? Found a bug? Do you have general questions or suggestions for improving the media library? Feel free to create an issue on GitHub, we'll try to address it as soon as possible.

If you've found a bug regarding security please mail [email protected] instead of using the issue tracker.

Upgrading major versions

Please see UPGRADING for more information on how to upgrade from one major version to the other.

Testing

bash
composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Postcardware

You're free to use this package, but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.

Our address is: Spatie, Samberstraat 69D, 2060 Antwerp, Belgium.

We publish all received postcards on our company website.

Credits

  • Brent Roose
  • Alex Vanderbist
  • Ruben Van Assche
  • Sebastian De Deyne
  • Freek Van der Herten
  • All Contributors

Support us

Spatie is a webdesign agency based in Antwerp, Belgium. You'll find an overview of all our open source projects on our website.

Does your business depend on our contributions? Reach out and support us on Patreon. All pledges will be dedicated to allocating workforce on maintenance and new awesome stuff.

License

The MIT License (MIT). Please see License File for more information.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

PHPbladecomponentslaravelphp

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类后端框架
定价开源

> 相关工具

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架