Closed altayevrim closed 2 months ago
Hello there! Thanks for opening your first issue on this repo!
Just a heads-up: Here at Backpack we use Github Issues only for tracking bugs. Talk about new features is also acceptable. This helps a lot in keeping our focus on improving Backpack. If you issue is not a bug/feature, please help us out by closing the issue yourself and posting in the appropriate medium (see below). If you're not sure where it fits, it's ok, a community member will probably reply to help you with that.
Backpack communication channels:
backpack-for-laravel
tag;Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or Stackoverflow is thanks to our awesome awesome community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch.
Thank you!
-- Justin Case The Backpack Robot
Hey @altayevrim
I doubt enumClass()
is working; it must be picking DB values.
Can you retry with ->enum_class(\App\Enums\LineTypeEnum::class)
& ->enum_function('readableText')
?
Closing it due to no activity! Feel free to reopen it if you continue to face the issue.
Bug report
What I did
I tried to use CRUD Fluent API on columns to add a enum column (PHP Enum).
enumClass
and all others work well butenumFunction
seems not workingWhat I expected to happen
The same result when I add the column with this;
What happened
Instead of invoking the
readableText
method of the\App\Enums\LineTypeEnum::class
the raw value of from the database been displayed.What I've already tried to fix it
I think enumFunction should be added to the Fluent API.
Is it a bug in the latest version of Backpack?
I couldn't test it because backpackforlaravel.com seems down at the moment I send this.
Backpack, Laravel, PHP, DB version
When I run
php artisan backpack:version
the output is: