定制 milenmk/laravel-simple-datatables 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

milenmk/laravel-simple-datatables

最新稳定版本:2.1.9

Composer 安装命令:

composer require milenmk/laravel-simple-datatables

包简介

Simple Table component to create datatables for Livewire components

README 文档

README

Latest Version on Packagist Total Downloads GitHub User's stars Laravel 10 Support PHP Version Support License Contributions Welcome Sponsor me

A lightweight, easy-to-use Laravel package for creating interactive data tables and dynamic forms with Livewire integration.

Screenshot Screenshot

Overview

Laravel Simple Datatables And Forms provides two powerful components for your Laravel applications:

📊 Data Tables

Create interactive, feature-rich data tables with minimal code. Includes advanced search, sorting, filtering, grouping, and export capabilities.

📝 Dynamic Forms

Build dynamic forms with fluent API, multiple field types, validation, and model binding support.

Key Features

  • 🔍 Advanced Search - Debounced search with minimum character requirements
  • 🔄 Column Sorting - Click-to-sort functionality for table columns
  • 🧹 Filtering & Grouping - Multiple filter types with advanced grouping options
  • 📤 Data Export - Export to CSV, Excel, and PDF formats
  • 📝 Dynamic Forms - Fluent features for building complex forms
  • 🔧 Multiple Field Types - Input, Select, Checkbox, Toggle, Textarea, and more
  • Validation Integration - Built-in Laravel validation support
  • 📱 Responsive Design - Mobile-friendly components
  • Performance Optimized - Intelligent caching and query optimization
  • 🔒 Security Features - CSRF protection and input sanitization
  • 🧩 Seamless Livewire Integration - Built specifically for Livewire 3.x

Requirements

  • PHP 8.2 or higher (compatible with PHP 8.3 and 8.4)
  • Laravel 10.x or higher (compatible with Laravel 11.x and 12.x)
  • Livewire 3.x or higher

Quick Start

Installation

composer require milenmk/laravel-simple-datatables-and-forms

Publish Configurations

php artisan vendor:publish --tag=laravel-simple-datatables-and-forms-config

Publish Assets

php artisan simple-datatables-and-forms:publish-assets

Include Assets in Your Layout

<head>
    @SimpleDatatablesStyle
</head>
<body>
    <!-- Your content -->
    @SimpleDatatablesScript
</body>

Create Your First Data Table

Generate a table component:

php artisan make:milenmk-datatable UserList User --generate

Or create manually:

use Milenmk\LaravelSimpleDatatablesAndForms\Traits\HasTable;

class UserList extends Component
{
    use HasTable;

    public function table(Table $table): Table
    {
        return $table
            ->query(User::query())
            ->schema([
                TextColumn::make('name')->searchable()->sortable(),
                TextColumn::make('email')->searchable(),
                ToggleColumn::make('is_active')->label('Active'),
            ])
            ->striped()
            ->paginate();
    }
}

Create Your First Form

Generate a form component:

php artisan make:milenmk-form CreateUser create User --generate

Or create manually:

use Milenmk\LaravelSimpleDatatablesAndForms\Traits\HasForm;

class CreateUser extends Component
{
    use HasForm;

    public function form(Form $form): Form
    {
        return $form->model(User::class)->schema([
            InputField::make('name')->required(),
            InputField::make('email')->email()->required(),
            SelectField::make('role')
                ->options(['admin' => 'Admin', 'user' => 'User'])
                ->required(),
        ]);
    }
}

Documentation

📚 Complete Documentation

📊 Data Tables Documentation

📝 Forms Documentation

Tailwind CSS Integration

Add the package views to your Tailwind configuration:

// tailwind.config.js
module.exports = {
    content: [
        // ... your existing content paths
        './vendor/milenmk/laravel-simple-datatables-and-forms/resources/views/**/*.blade.php',
    ],
    // ... rest of your configuration
};

Contributing

Contributions are welcome! Please visit our GitHub repository to:

  • Report bugs or request features
  • Submit pull requests
  • Browse existing issues
  • Join discussions

Support

Changelog

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

Support My Work

If this package saves you time, you can support ongoing development:
👉 Become a Patron

Other Packages

Check out my other Laravel packages:

License

This package is licensed under the MIT License. See the LICENSE file for more details.

Disclaimer

This package is provided "as is", without warranty of any kind, express or implied, including but not limited to warranties of merchantability, fitness for a particular purpose, or noninfringement.

The author(s) make no guarantees regarding the accuracy, reliability, or completeness of the code, and shall not be held liable for any damages or losses arising from its use.

Please ensure you thoroughly test this package in your environment before deploying it to production.

milenmk/laravel-simple-datatables 适用场景与选型建议

milenmk/laravel-simple-datatables 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 47 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 03 月 14 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 milenmk/laravel-simple-datatables 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 milenmk/laravel-simple-datatables 我们能提供哪些服务?
定制开发 / 二次开发

基于 milenmk/laravel-simple-datatables 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-03-14