Skip to content

I did an installation from scratch with laravel 10.43 and installed livewire 3 and then installed powergrid 5 #1371

Discussion options

You must be logged in to vote

Hi @LeandroAndrade2020, thanks for letting us. The stubs were fixed.

Please use add(...) instead of addColumn(..).

use PowerComponents\LivewirePowerGrid\PowerGrid;
use PowerComponents\LivewirePowerGrid\PowerGridFields;

public function fields(): PowerGridFields
{
    return PowerGrid::fields()
        ->add('id')
        ->add('name')
        ->add('email')
        ->add('created_at_formatted', fn (User $model) => Carbon::parse($model->created_at)->format('d/m/Y H:i:s'));
}

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by LeandroAndrade2020
Comment options

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