useclassy/laravel 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

useclassy/laravel

最新稳定版本:v1.0.0

Composer 安装命令:

composer require useclassy/laravel

包简介

Laravel integration for UseClassy - Transform class:modifier syntax in Blade templates

README 文档

README

Laravel integration for UseClassy that transforms class:modifier="value" syntax in Blade templates.

Installation

composer require useclassy/laravel

The service provider will be automatically registered via Laravel's package auto-discovery.

Usage

Use the class:modifier syntax in your Blade templates:

<h1 class="text-xl" class:lg="text-3xl" class:hover="text-blue-600">
    Responsive heading that changes on large screens and hover
</h1>

<div class:dark="bg-gray-800 text-white" class:lg="p-6">
    Dark mode and responsive padding
</div>

The package will automatically transform these during Blade compilation:

  • class:lg="text-3xl" becomes lg:text-3xl
  • class:hover="text-blue-600" becomes hover:text-blue-600
  • class:dark="bg-gray-800 text-white" becomes dark:bg-gray-800 dark:text-white

These transformed classes are merged with any existing class attributes.

How it Works

This package hooks into Laravel's Blade compiler to transform the UseClassy syntax before the template is rendered. It works seamlessly with:

  • Hot module reloading
  • Blade caching
  • All Laravel versions 10+

Requirements

  • PHP ^8.1
  • Laravel ^10.0|^11.0|^12.0

License

MIT

统计信息

  • 总下载量: 11
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-26