Skip to content
Discussion options

You must be logged in to vote

Hey! I know it is an old discussion but if incase someone needs it, here is how you can do it.

Hope this helps.

    public function addColumns(): PowerGridColumns
    {
        return PowerGrid::columns()
            ->addColumn('id')
            ->addColumn('user_name_formatted', function (OrderProduct $model) {
                    return $model->first_name.' '.$model->middle_name.' '.$model->last_name;
            });
    }
    
    
        public function columns(): array
    {
        return [
            Column::make('Name', 'user_name_formatted', 'first_name')
                ->searchable()
        ];
    }

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by luanfreitasdev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants