how to set url to a route out of filament panels
hello i want to create a button which is linked to main page of website. how should i set the route in url()?
i tried this :
TextColumn::make('status')
->label('عملیات')
->formatStateUsing(
function ($state) {
return 'مشاهده';
}
)
->color('primary')
->icon('heroicon-o-eye')
->iconColor('primary')
->url(
function ($record) {
route('main.preview_product', ['id' => $record->id]);
}
)
->openUrlInNewTab()
but it goes to edit page of this record 😐2 Replies
Solution
thanks for replying👍 😃