Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Gridview Laravel Package

neoacevedo/laravel-gridview

A Laravel package for building configurable data grid views from Eloquent models, helping you turn query results into clean, reusable tables with custom columns, sorting, filtering, and pagination instead of repeating view code for every listing.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Install the package with Composer and let Laravel auto-discovery register it. Publish any package config/assets if the README instructs it, then clear config/view caches.
  • Look first at the package README/examples, the published config file if present, and the GridView/column classes. These define how columns, sorting, filtering, and rendering are wired.
  • Start with a simple Eloquent-backed admin index page: define a grid with a few data columns, mark only real database columns as sortable, pass the query/paginator into the grid, and render it in Blade. Use the new caption support in 24.03.10 to give the table an accessible title.

Implementation Patterns

  • Define one grid configuration per resource, either in the controller/action or in a dedicated grid class if you want reuse. Keep query construction, authorization, and eager loading outside the grid so the grid remains presentation-focused.
  • Use column definitions for normal data columns, action columns, and custom-rendered columns. Only enable sorting on columns backed by a real sortable query field; leave computed/custom columns unsortable.
  • For index pages, the common workflow is: build a filtered query in the controller, pass it to the grid, let the grid handle sort/pagination parameters, then render the grid in a Blade view.
  • Reuse base grid classes or shared column sets for common admin patterns such as ID, timestamps, status badges, and action links. Override headers/row rendering through the package’s extension points rather than editing vendor files.
  • Use the new table caption feature for admin screens with multiple tables or for accessibility. Set it from the grid configuration and keep the caption text consistent with the page section title.
  • Integration tip: eager-load relationships used by grid columns, and keep expensive computed columns out of the main query where possible.

Gotchas and Tips

  • 24.03.10 fixes sort icons appearing on columns that are not sortable. If you still see stray icons after upgrading, check your custom column/header views and ensure unsortable columns are explicitly marked as such; then clear compiled Blade views.
  • The caption generation is new in this release. Verify that your caption text is escaped correctly and that custom table header views still render the caption in the expected position.
  • When sorting misbehaves, inspect the request’s sort parameter and compare it with the column’s sortable definition. Custom columns often need extra care because they may not map directly to a database column.
  • After upgrading, run composer update neoacevedo/laravel-gridview, then clear caches with php artisan view:clear and php artisan config:clear if you publish config.
  • No breaking changes are indicated by the release notes, but test custom column headers and action columns after upgrading, especially if you override package views.
  • Useful extension points are custom column classes and header/row view overrides. Prefer those over patching package source so future releases remain easy to adopt.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource