定制 solution-forest/grid-layout-plugin 二次开发

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

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

solution-forest/grid-layout-plugin

最新稳定版本:0.0.1

Composer 安装命令:

composer require solution-forest/grid-layout-plugin

包简介

This is a grid layout plugin for Filament Admin

README 文档

README

Important

We will archive this project since filament3 supports Grid now. https://beta.filamentphp.com/docs/3.x/infolists/layout/grid

Grid Layout Plugin

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This is a grid layout plugin for Filament Admin

Installation

You can install the package via composer:

composer require solution-forest/grid-layout-plugin

Optionally, you can publish the views using

php artisan vendor:publish --tag="grid-layout-plugin-views"

Usage

To create grid layout page :

php artisan make:filament-grid-page

The getGridSchema() method is used to define the structure of grid layout. It is an array of fields, in the order they should appear in the layout.

The following components are available for grid layout:

  • \SolutionForest\GridLayoutPlugin\Components\Grid\Row
  • \Livewire\Component
  • \Illuminate\View\Component
  • \Illuminate\Support\HtmlString
use SolutionForest\GridLayoutPlugin\Pages\Grid as BasePage;
use SolutionForest\GridLayoutPlugin\Components\Grid;
use SolutionForest\GridLayoutPlugin\Components\Grid\Row;
use SolutionForest\GridLayoutPlugin\Components\Grid\Column;

protected function getGridSchema(): array
{
    return [
        Components\Grid\Row::make([
            Components\Grid\Column::make(
                6,
                \Filament\Widgets\StatsOverviewWidget\Card::make('Revenue', '$192.1k')
                    ->description('32k increase')
                    ->descriptionIcon('heroicon-s-trending-up')
                    ->chart([7, 2, 10, 3, 15, 4, 17])
                    ->color('success'),
            ),
            Components\Grid\Column::make(
                6,
                \Filament\Widgets\StatsOverviewWidget\Card::make('Revenue', '$192.1k')
                    ->description('3% decrease')
                    ->descriptionIcon('heroicon-s-trending-down')
                    ->chart([17, 16, 14, 15, 14, 13, 12])
                    ->color('danger')
            ),
        ]),
        \Filament\Widgets\StatsOverviewWidget\Card::make('Revenue', '$192.1k')
            ->description('7% increase')
            ->descriptionIcon('heroicon-s-trending-up')
            ->chart([15, 4, 10, 2, 12, 4, 12])
            ->color('success'),
        new \Illuminate\Support\HtmlString("<div>Dummy Html Element</div>"),
        view('welcome'),
    ];
}

Or you can create grid layout which only support widgets similar with \Filament\Pages\Dashboard:

php artisan make:filament-grid-page --type=widget
protected function getWidgets(): array
{
    return [
        \Filament\Widgets\AccountWidget::class,
        \Filament\Widgets\FilamentInfoWidget::class,
    ];
}

Testing

composer test

Changelog

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

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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

统计信息

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

GitHub 信息

  • Stars: 7
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-03-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固