How do I add a column to an existing table?

You can use the add() method(s) to add a column to an existing table:

\Aero\Admin\Tables\Orders\OrderUnfulfilledItemsTable::extend(function (\Aero\Admin\Tables\Orders\OrderUnfulfilledItemsTable $table) {
    // Add it at the end
    $table->column('reference')
        ->value(function ($row) {
            return $row->reference ?? view('admin::resource-lists.placeholder');
        });

    // Add it after a specific column
    $table->column('reference')
        ->after('sku')
        ->value(function ($row) {
            return $row->reference ?? view('admin::resource-lists.placeholder');
        });

    // Add it before a specific column
    $table->column('reference')
        ->before('sku')
        ->value(function ($row) {
            return $row->reference ?? view('admin::resource-lists.placeholder');
        });
});

 


Revision #1
Created 2026-09-24 13:38:10 UTC by Ethan Payne
Updated 2026-09-24 13:39:49 UTC by Ethan Payne