public function table($item)
    {
        return $this->table->of('inventory', function (TableGrid $table) use ($item) {
            $table->with($item)->paginate($this->perPage);

            $table->attributes([
                'class' => 'table table-hover table-striped',
            ]);

            $table->column('ID', 'id');

            $table->column('sku', function (Column $column) {
                $column->label = 'SKU';

                $column->value = function (Inventory $item) {
                    return $item->getSku();
                };
            });

            $table->column('name', function (Column $column) {
                $column->value = function (Inventory $item) {
                    return link_to_route('maintenance.inventory.show', $item->name, [$item->getKey()]);
                };
            });

            $table->column('category', function (Column $column) {
                $column->value = function (Inventory $item) {
                    return $item->category->trail;
                };
            });

            $table->column('current_stock', function (Column $column) {
                $column->value = function (Inventory $item) {
                    return $item->getTotalStock();
                };
            });
        });
    }
public function table($item)
    {
        return $this->table->of('inventory', function (TableGrid $table) use ($item) {
            $table->with($item)->paginate($this->perPage);

            $table->attributes([
                'class' => 'table table-hover table-striped',
            ]);

            $table->column('ID', 'id');

            $table->column('sku', function (Column $column) {
                $column->label = 'SKU';

                $column->value = function (Inventory $item) {
                    return $item->getSku();
                };
            });

            $table->column('name', function (Column $column) {
                $column->value = function (Inventory $item) {
                    return link_to_route('maintenance.inventory.show', $item->name, [$item->getKey()]);
                };
            });

            $table->column('category', function (Column $column) {
                $column->value = function (Inventory $item) {
                    return $item->category->trail;
                };
            });

            $table->column('current_stock', function (Column $column) {
                $column->value = function (Inventory $item) {
                    return $item->getTotalStock();
                };
            });
        });
    }
public function table ( $ item ) { return $ this -> table -> of ( 'inventory' , function ( TableGrid $ table ) use ( $ item ) { $ table -> with ( $ item ) -> paginate ( $ this -> perPage ) ; $ table -> attributes ( [ 'class' => 'table table-hover table-striped' , ] ) ; $ table -> column ( 'ID' , 'id' ) ; $ table -> column ( 'sku' , function ( Column $ column ) { $ column -> label = 'SKU' ; $ column -> value = function ( Inventory $ item ) { return $ item -> getSku ( ) ; } ; } ) ; $ table -> column ( 'name' , function ( Column $ column ) { $ column -> value = function ( Inventory $ item ) { return link_to_route ( 'maintenance.inventory.show' , $ item -> name , [ $ item -> getKey ( ) ] ) ; } ; } ) ; $ table -> column ( 'category' , function ( Column $ column ) { $ column -> value = function ( Inventory $ item ) { return $ item -> category -> trail ; } ; } ) ; $ table -> column ( 'current_stock' , function ( Column $ column ) { $ column -> value = function ( Inventory $ item ) { return $ item -> getTotalStock ( ) ; } ; } ) ; } ) ; }
Returns a table of all inventory items.

@param Inventory|\Illuminate\Database\Eloquent\Builder $item

@return \Orchestra\Contracts\Html\Builder
Returns a table of all inventory items .