F
Filament5mo ago
jals65

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>
Solution:
getState() if you are using ::make('token') or $getRecord() to get the record ```html <div> {{ $getState() }}...
Jump to solution
4 Replies
micraux
micraux5mo ago
Try this (not tested): ViewColumn::make('token')->view('visual-testing::livewire.visual-testing-test')
Solution
LeandroFerreira
LeandroFerreira5mo ago
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>
jals65
jals65OP5mo ago
it works with $getState()
jals65
jals65OP5mo ago
Thanks
Want results from more Discord servers?
Add your server