danherbert-io/elide-for-laravel 问题修复 & 功能扩展

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

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

danherbert-io/elide-for-laravel

最新稳定版本:v1.1.2

Composer 安装命令:

composer require danherbert-io/elide-for-laravel

包简介

HTMX utils to streamline your Laravel+HTMX powered site.

README 文档

README

Elide package logo

Introduction

Elide (verb)

  • to join different things together as if they are the same; to become joined in this way

Elide is a small package for use with Laravel and HTMX. It aims to streamline the gap between backend and frontend by making it easy to return full page responses, or just partials (i.e., components). It also provides handy methods of checking HTMX properties of requests and responses.

Strongly inspired by Inertia.

use Elide\Htmx;
use App\Models\Product;
use App\View\Components\Content\ProductDetails;
use App\View\Components\Ui\ToastNotification;

class ViewProductController {
    public function __invoke(Product $product) {
        if (wasAddedToCart($product)) {
            Htmx::sendWithResponse(new ToastNotification('Added to cart!'));
        }
        
        return Htmx::render(new ProductDetails($product));
    }
}

Important

We're still writing Elide's documentation. For a practical example/reference you can check out the demonstration site: https://github.com/danherbert-io/elide-demo-site

Elide is open-source software licensed under the MIT licence.

Documentation

Important

Elide leverages HTMX's swap attributes - you should have an understanding of how HTMX works before using Elide. HTMX's documentation covers pretty much everything, and the HTMX examples provide a lot of practical examples of how to use HTMX in the frontend to talk to the backend.

Starter kit

Elide has a simple starter kit to help you get going quickly.

laravel new --using=danherbert-io/elide-simple-starter-kit

Other resources

统计信息

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

GitHub 信息

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

其他信息

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