We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad60c4a commit 8e01b81Copy full SHA for 8e01b81
src/ApiResourceDataTable.php
@@ -37,8 +37,8 @@ public function __construct(AnonymousResourceCollection $collection)
37
{
38
$this->request = app('datatables.request');
39
$this->config = app('datatables.config');
40
- $this->collection = collect($collection);
41
- $this->original = collect($collection);
42
- $this->columns = array_keys($this->serialize(collect($collection)->first()));
+ $this->collection = collect($collection)->pluck('resource');
+ $this->original = collect($collection)->pluck('resource');
+ $this->columns = array_keys($this->serialize(collect($collection)->pluck('resource')->first()));
43
}
44
0 commit comments