accelade/grids
Composer 安装命令:
composer require accelade/grids
包简介
Grid components for Accelade - display data in cards, masonry layouts, and responsive grids
README 文档
README
Card-based Grid Layouts for Laravel. Zero Complexity.
Build beautiful, responsive card grids with minimal code. Accelade Grids provides powerful components for displaying data in cards, masonry layouts, and responsive grids.
use Accelade\Grids\Grid; use Accelade\Grids\Cards\Card; use App\Models\Product; $grid = Grid::make('products') ->query(Product::query()) ->columns(3) ->card( Card::make() ->title(fn ($record) => $record->name) ->description(fn ($record) => $record->description) ->image(fn ($record) => $record->image_url) ->url(fn ($record) => route('products.show', $record)) ) ->fromRequest() ->paginate();
That's it. Render with <x-grids::grid :grid="$grid" />.
Why Accelade Grids?
- Filament-Compatible API - Familiar syntax if you use Filament
- Responsive Layouts - Automatic column adjustments for different screen sizes
- Masonry Support - Pinterest-style staggered layouts
- Cards - Flexible card templates with images, titles, descriptions, badges
- Card Sections - Display key-value pairs within cards
- Actions - Support for row actions on each card
- Pagination - Built-in pagination support
- Filters - Apply filters to narrow results (via Query Builder)
- Search - Full-text search support
- Sorting - Sortable columns
- Dark Mode - Built-in dark mode support
Quick Start
composer require accelade/grids
The service provider will be automatically registered.
Publish Configuration
php artisan vendor:publish --tag=grids-config
Features at a Glance
Basic Grid
use Accelade\Grids\Grid; use Accelade\Grids\Cards\Card; use App\Models\Product; $grid = Grid::make('products') ->query(Product::query()) ->columns(4) ->gap('6') ->card( Card::make() ->title(fn ($record) => $record->name) ->description(fn ($record) => Str::limit($record->description, 100)) ->image(fn ($record) => $record->image_url) ->url(fn ($record) => route('products.show', $record)) );
Card with Sections
use Accelade\Grids\Cards\Card; use Accelade\Grids\Cards\CardSection; Card::make() ->title(fn ($record) => $record->name) ->description(fn ($record) => $record->excerpt) ->sections([ CardSection::make() ->label('Price') ->value(fn ($record) => '$' . number_format($record->price, 2)) ->icon('heroicon-o-currency-dollar') ->color('success'), CardSection::make() ->label('Stock') ->value(fn ($record) => $record->stock . ' available') ->icon('heroicon-o-cube'), ]);
Card with Badge and Actions
use Accelade\Grids\Cards\Card; use Accelade\Actions\ViewAction; use Accelade\Actions\EditAction; use Accelade\Actions\DeleteAction; Card::make() ->title(fn ($record) => $record->name) ->badge(fn ($record) => $record->is_featured ? 'Featured' : null, 'primary') ->actions([ ViewAction::make(), EditAction::make(), DeleteAction::make(), ], position: 'footer');
Responsive Columns
// Fixed columns $grid->columns(4); // Responsive columns $grid->columns([ 'default' => 1, 'sm' => 2, 'md' => 3, 'lg' => 4, 'xl' => 5, ]);
Masonry Layout
$grid = Grid::make('gallery') ->query(Photo::query()) ->masonry() ->columns(4);
List Layout
$grid = Grid::make('articles') ->query(Article::query()) ->list(); // Single column list
With Header
$grid = Grid::make('products') ->heading('Product Gallery') ->description('Browse our collection') ->headerActions([ CreateAction::make(), ExportAction::make(), ]);
Empty State
$grid = Grid::make('products') ->emptyStateHeading('No products found') ->emptyStateDescription('Try adjusting your search or filters') ->emptyStateIcon('heroicon-o-cube') ->emptyStateActions([ CreateAction::make()->label('Create Product'), ]);
Blade Component
<x-grids::grid :grid="$grid" />
Requirements
- PHP 8.2+
- Laravel 11.x or 12.x
- accelade/accelade ^1.0
- accelade/query-builder ^1.0
- accelade/filters ^1.0
- accelade/actions ^1.0
Documentation
| Guide | Description |
|---|---|
| Overview | Introduction and basic concepts |
| Cards | Card component configuration |
| Layouts | Grid layout options |
| Filters | Filtering and search |
Accelade Ecosystem
Accelade Grids is part of the Accelade ecosystem:
| Package | Description |
|---|---|
| accelade/accelade | Core reactive Blade components |
| accelade/schemas | Schema-based layouts |
| accelade/forms | Form builder with validation |
| accelade/infolists | Display read-only data |
| accelade/tables | Data tables with filtering |
| accelade/actions | Action buttons with modals |
| accelade/widgets | Dashboard widgets |
| accelade/grids | Card-based grids (this package) |
| accelade/query-builder | Query builder utilities |
| accelade/filters | Filter components |
License
MIT License. See LICENSE for details.
accelade/grids 适用场景与选型建议
accelade/grids 是一款 基于 Blade 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 01 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「gallery」 「cards」 「blade」 「masonry」 「grids」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 accelade/grids 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 accelade/grids 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 accelade/grids 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Fork Off inacho/php-credit-card-validator Because it looks like is not being manteined anymore --- Validates popular debit and credit cards numbers against regular expressions and Luhn algorithm. Also validates the CVC and the expiration date
Laravel >=5.6 integration for the PHP Credit Cards package that allows to perform operations on debit and credit cards like format, validate brand, number and Luhn algorithm.
A Filament-native cards plugin for organizing pages and resources into a card-based navigation hub.
A module for the SilverStripe CMS which allows you to organize images in a gallery format.
Creates a basic photo gallery pagetype with albums and photos. Photos within albums are opened with a lightbox.
Opay gateway library with composer support
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 33
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-19