Okipa/laravel-table

Column not extendable because of `self`

Iaotle opened this issue · 1 comments

Iaotle commented

I tried to extend the column to make a custom one but encountered an issue where the make method doesn't return an instance of the extended class but rather the parent. I think the better way would be to return new static($attribute) instead as that would return the child class as expected.

https://github.com/Okipa/laravel-table/blob/1b3d7db455f51156bc91cce55d5c74bdd98aa37b/src/Column.php#LL39C1-L42C6

Okipa commented

Hi @Iaotle, would make a PR with this change ? If there is no breaking change, I would merge this 👍