public function tableMovements(Inventory $item, InventoryStock $stock)
    {
        $movements = $stock->movements();

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

            $table->pageName = 'stock-movements';

            $table->column('before');

            $table->column('after');

            $table->column('change');

            $table->column('cost');

            $table->column('reason');

            $table->column('Change By', function (Column $column) {
                return $column->value = function (InventoryStockMovement $movement) {
                    if ($movement->user instanceof User) {
                        return $movement->user->getRecipientName();
                    }

                    return HTML::create('em', 'Unknown');
                };
            });

            $table->column('Change On', 'created_at');
        });
    }
public function tableMovements(Inventory $item, InventoryStock $stock)
    {
        $movements = $stock->movements();

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

            $table->pageName = 'stock-movements';

            $table->column('before');

            $table->column('after');

            $table->column('change');

            $table->column('cost');

            $table->column('reason');

            $table->column('Change By', function (Column $column) {
                return $column->value = function (InventoryStockMovement $movement) {
                    if ($movement->user instanceof User) {
                        return $movement->user->getRecipientName();
                    }

                    return HTML::create('em', 'Unknown');
                };
            });

            $table->column('Change On', 'created_at');
        });
    }
public function tableMovements ( Inventory $ item , InventoryStock $ stock ) { $ movements = $ stock -> movements ( ) ; return $ this -> table -> of ( 'inventory.stocks.movements' , function ( TableGrid $ table ) use ( $ item , $ movements ) { $ table -> with ( $ movements ) -> paginate ( $ this -> perPage ) ; $ table -> pageName = 'stock-movements' ; $ table -> column ( 'before' ) ; $ table -> column ( 'after' ) ; $ table -> column ( 'change' ) ; $ table -> column ( 'cost' ) ; $ table -> column ( 'reason' ) ; $ table -> column ( 'Change By' , function ( Column $ column ) { return $ column -> value = function ( InventoryStockMovement $ movement ) { if ( $ movement -> user instanceof User ) { return $ movement -> user -> getRecipientName ( ) ; } return HTML :: create ( 'em' , 'Unknown' ) ; } ; } ) ; $ table -> column ( 'Change On' , 'created_at' ) ; } ) ; }
Returns a new table of all movements for the specified inventory stock.

@param Inventory      $item
@param InventoryStock $stock

@return \Orchestra\Contracts\Html\Builder
Returns a new table of all movements for the specified inventory stock .