Closed vishalsinhadev closed 5 years ago
Good day, Sir! Which package version do you use? You seem read docs for v1.x but used 2.x, which have totally different action columns. Take a look here: https://deniskoronets.github.io/Laravel-GridView/getting-started
Now, action column has actions inside so in value you have to specify a list of actions:
[
'class' => 'actions', // class option allows to change column class
'value' => [
'edit:/path/to/{id}', // {id} - will be replaced with an attribute from row
'view:/path/{id}',
'delete:/path/to/{id}',
new \Woo\GridView\Columns\Actions\Action('copy/{id}', '<i class="fa fa-copy"></i>'),
]
]
In your case it should look like this:
[
'class' => 'actions',
'value' => [
'edit:' . route('course.edit', ['id' => '{id}']),
'view:' . route('course.show', ['id' => '{id}']),
]
]
Let me know if you have any issues with it
well, thanks, I followed the different documentation, I think you need to add this in the documentation. This package is really a great way for integration just like Yii2 grid view. This package just needs proper documentation for implementation.
It has proper documentation by this url: https://deniskoronets.github.io/Laravel-GridView/
Thanks @deniskoronets
I am using an action column in this way :
But I am getting an error :
Tests array has failed on Woo\GridView\Columns\ActionsColumn::value: Property should be an array