Let's say I have a lengthy online form related to hiring for a particular position, and I received a good number of applicants. Now, lo...
Let's say I have a lengthy online form related to hiring for a particular position, and I received a good number of applicants. Now, looking at a glance, these records look very similar, which makes it a bit hard to compare. This is just one example; there could be other real-world scenarios where we want to compare records like specs, etcβ¦
We have to thank Mauro Martinez for introducing the compare feature in Backpack. This handy tool lets the admin compare the records side by side, making it easy β from choosing the best candidates to finding the best product based on their features.
To use the compare feature in your backpack project:
composer require maurohmartinez/compare-operation-backpack-laravel
+ use \MHMartinez\CompareOperation\CompareOperation;
setupCompareOperation()
just like you'd do with the Show Operation:protected function setupCompareOperation(): void
{
$this->crud->column('id');
$this->crud->column('name');
$this->crud->column('email');
// or...
// $this->setupShowOperation();
}
And... we are all set to compare!π¨βπ»π
With just a few simple steps, workflow can be made more efficient and side-by-side comparisons can be made easy.
The Comparison feature in Backpack is ready to lend a hand when the data gets messy. With just a few steps, you can easily set up side-by-side comparisons using Mauroh's compare operation. Happy Coding!
Subscribe to our "Article Digest". We'll send you a list of the new articles, every week, month or quarter - your choice.
What do you think about this?
Wondering what our community has been up to?