TappNetwork / filament-auditing

A Filament plugin for Laravel Auditing package.
81 stars 20 forks source link

Extending Columns #1

Closed LogicSatinn closed 2 years ago

LogicSatinn commented 2 years ago

There are columns that somebody may want to be added to the Relation Manager without editing the component in the vendor folder. So this PR adds the ability to add columns they'd like to add to the Relation Manager via the config file.

LogicSatinn commented 2 years ago

Thank you! Can you add a section to the docs that details how to use this?

Sure thing @swilla

LogicSatinn commented 2 years ago

@swilla I have added the section to the docs. I hope it's clear and understandable enough.

LogicSatinn commented 2 years ago

That's great, thank you @LogicSatinn for this contribution!

Something I noticed when testing: I think this way (\Filament\Tables\Columns\TextColumn::make('id')) it's not allowed for serialization on config file.

When I run php artisan optimize, I get this message when caching the config files:

artisan

😢Shoot ... I somehow missed that. And the solution you provided is genius. Let's see how we can make that happen.

LogicSatinn commented 2 years ago

@andreia I'm concerned about the inability to chain table methods on the classes though. I'm trying to see if there's anything I can do about that.

LogicSatinn commented 2 years ago

@andreia @swilla Things may not be clean as one would like but, I hope that does the work. If there's any other problem, ping @LogicSatinn .