Support the ongoing development of Laravel.io →
Eloquent Views Blade
Last updated 2 years ago.
0

I do my conditional checks in the controller (not sure if this is the best practice).

$data = Datatables::of($profile)
                                ->add_column('status', function ($result_obj) {
                                     if ('Example' === $result_obj->status) {
                                        return '<span>Example</span';
                                    } else {
                                        return 'Awesome';
                                    }
                                })
Last updated 9 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

jaiimg jaiimg Joined 7 Jan 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.