ForestAdmin / forest-laravel

🌱 Laravel Liana for Forest Admin. This repo is no longer maintained. Please use laravel-forestadmin instead: https://github.com/ForestAdmin/laravel-forestadmin
GNU General Public License v3.0
4 stars 0 forks source link

Segment filter on boolean value does not work #68

Closed bjorntheart closed 2 years ago

bjorntheart commented 6 years ago

Expected behavior

column: is_paid
data type: tinyint
possible values: 1 or 0

Adding a Segment to filter on a boolean produces incorrect results. The generated Segment query params looks like this: filterType=and&is_paid[0][val]=true&is_paid[0][op]=is.

If true, passed from the query string, is checked agains 1 or 0 in the database, it won't return any results. Do you cast true or false to 1 or 0 when filtering?

Actual behavior

Manually changing segment query string to filterType=and&is_paid[0][val]=1&is_paid[0][op]=is produces the correct results.

Context

arnaudbesnier commented 2 years ago

Hi @bjorntheart,

This issue will be closed as the repository will be archived soon.

The brand new Laravel agent for Forest Admin is available here: https://github.com/ForestAdmin/laravel-forestadmin

As we now have a team of dedicated developers for this new Laravel agent, be sure Forest Admin will provide a much better Laravel support experience compared to the one you had in the past for v1.

Forest Admin also evolved a lot in 4 years as an internal tool platform, don’t hesitate to give it another try, you should not be disappointed 🌲🌲🌲

Best Regards.