Weave Code
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

Data Grid Bundle Laravel Package

ano/data-grid-bundle

View on GitHub
Deep Wiki
Context7

AnoDataGridBundle

Installation

Usage

Building the grid

class DashboardController extends AdminController
{
    public function gridAction(Request $request, $page = 1, $pageSize = 10)
    {
        $factory = $this->getDataGridFactory();
        $grid = $factory->createBuilder('my_grid')
            ->addColumn('id', 'text', array(
                'label' => 'ID',
                'property_path' => 'id',
            ))
            ->addColumn('title', 'text', array(
                'label' => 'Title',
                'property_path' => 'title',
            ))
            ->addColumn('author', 'text', array(
                'label' => 'Author',
                'property_path' => 'author.name',
            ))
            ->addColumn('date', 'date', array(
                'label' => 'Released at',
                'property_path' => 'releasedAt',
            ))
            ->addColumn('price', 'money', array(
                'label' => 'Price',
                'property_path' => 'price',
            ))
            ->addColumn('edit', 'action', array(
                'label' => 'Edit',
                // 'callback' => function() {

                },
            ))
            ->getDataGrid()
        ;

        return $this->render('MyAdminBundle::grid.html.twig', array(
            'grid' => $grid->createView(),
        ));
    }

    /**
     * @return \Ano\DataGrid\DataGridFactoryInterface
     */
    public function getDataGridFactory()
    {
        return $this->get('ano_data_grid.data_grid.factory');
    }
}

Rendering the grid

{% data_grid_theme grid 'MyAdminBundle::grid_theme.html.twig' %}

<table class="datagrid">
    {{ grid_head(grid) }}
    {{ grid_body(grid) }}
    {{ grid_foot(grid) }}
</table>
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.
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver