yajra/laravel-datatables-ui 问题修复 & 功能扩展

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

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

yajra/laravel-datatables-ui

Composer 安装命令:

composer require yajra/laravel-datatables-ui

包简介

Laravel DataTables UI Preset

README 文档

README

Latest Version on Packagist Total Downloads

Laravel DataTables UI Preset to setup most of the scripts and css required for a DataTables powered projects.

Installation

You can install the package via composer:

composer require yajra/laravel-datatables-ui

Usage

Once the package has been installed, you may install the frontend scaffolding using the ui Artisan command:

// Generate basic scaffolding...
php artisan ui dt

// Generate login / registration scaffolding...
php artisan ui dt --auth

Usage with DataTables Editor

If you have license and want to use Editor, you need to setup the following:

  1. Enable editor library on bootstrap.js
require('datatables.net-editor-bs4');
  1. Use laravel-datatables-assets package instead of buttons.server-side.js script on app.js.
//require('./vendor/buttons.server-side');
require('laravel-datatables-assets/js/dataTables.buttons');
  1. Add postinstall script on package,json
    "scripts": {
        "dev": "npm run development",
        ...,
        "postinstall": "node ./node_modules/datatables.net-editor/install.js ./Editor.zip"
    },
  1. Download your copy of Editor Library JS + CSS file and save as Editor.zip.
  2. Move Editor.zip to your project base directory.
  3. Run npm install && npm run dev to compile changes.

Blade Directive @dataTable

To use @dataTable blade directive, you need to firt setup the following on your layout file.

  1. Include app.css on your layout.
  2. Include app.js on your layout.
  3. Add @stack('scripts') after app.js script include.

Example layout & page

resources/views/layouts/app.php

<!DOCTYPE html>
<html>
<head>
    <title>Laravel</title>
    <link rel="stylesheet" href="{{ mix('css/app.css') }}">
</head>
<body>
    @yield('content')

    <script src="{{ mix('js/app.js') }}"></script>
    @stack('scripts')
</body>
</html>

Create your dataTables class. See https://yajrabox.com/docs/laravel-datatables/master/buttons-starter for details.

On your view:

@extends('layouts.app')

@section('content')
@dataTable
@endsection

Changelog

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

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email aqangeles@gmail.com instead of using the issue tracker.

Credits

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-06-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固