Custom colum view

How can I get the $record->token and print it on a custom column view?
Column::make('test')->view('visual-testing::livewire.visual-testing-test')
Column::make('test')->view('visual-testing::livewire.visual-testing-test')
View:
<div class="flex">
<div>
<p>{{$token}}</p>
</div>
<x-heroicon-o-clipboard class="w-5 cursor-pointer" @click=""/>
</div>
<div class="flex">
<div>
<p>{{$token}}</p>
</div>
<x-heroicon-o-clipboard class="w-5 cursor-pointer" @click=""/>
</div>
2 Replies
micraux
micraux3d ago
Try this (not tested): ViewColumn::make('token')->view('visual-testing::livewire.visual-testing-test')
LeandroFerreira
getState() if you are using ::make('token') or $getRecord() to get the record
<div>
{{ $getState() }}
</div>
<div>
{{ $getState() }}
</div>
<div>
{{ $getRecord()->token }}
</div>
<div>
{{ $getRecord()->token }}
</div>