How do I add a custom column to the order list?

As the orders list is a resource list you can add a custom column like this:

More information on resource lists can be found in the article "How do I extend an existing Resource List?".



namespace Acme\MyModule;

use Aero\Admin\ResourceLists\OrdersResourceList;
use Aero\Common\Providers\ModuleServiceProvider;

class ServiceProvider extends ModuleServiceProvider
   public function setup()
       OrdersResourceList::extend(function (OrdersResourceList $list) {
           $list->addColumn('My Column', function ($row) {
               return '#'.$row->reference;

Articles in this section

Was this article helpful?
0 out of 0 found this helpful