Open pamungkasandono opened 1 month ago
Laravel-GridView documents: In case of CallbackColumn usage, instead of value pass \Closure which has a single argument - $model or $row to get access to current item.
now how to use $index and $key argument?
I'm trying to implement a serial number column in the Laravel GridView. I would like to know the best approach to achieve this.
Here are my questions:
Using SerialColumn:
In Yii2, we can easily add a serial number column using
['class' => 'yii\grid\SerialColumn']
. This automatically generates a serial number for each row.How can we achieve similar functionality in Laravel GridView?
Example in Yii2:
Example Implementation:
I appreciate any guidance on how to implement this feature effectively.
Thank you!