Omid
Omid
FFilament
Created by Omid on 2/16/2024 in #❓┊help
Why can't you set the state of Toggle Buttons?
This does not work, tried several different ways to set the toggle button value
ToggleButtons::make('test')
->options([1,2,3,4])
->default(1),
ToggleButtons::make('test')
->options([1,2,3,4])
->default(1),
6 replies
FFilament
Created by Omid on 2/14/2024 in #❓┊help
Good practice to create a route to a PDF download?
I want to create a PDF download link, I'm using Spatie's laravel-pdf However when for example defining a route in a resource 'generate' => Pages\GenerateDocument::route('/{record}/download') the page needs to extend extends Page but can't override the render()
3 replies
FFilament
Created by Omid on 2/11/2024 in #❓┊help
Open URL as modal, from a custom Blade form component
Is there a way to link to a record and open its view page in a modal? When removing the getRelationships view this will generate an error: DocumentResource::getUrl('view', ['record' => $item->model->id]);
@if($item->isDocument())
@php
$url = DocumentResource::getUrl('view', ['record' => $item->model->id]);
@endphp

<x-filament::badge tag="a" :href="$url" :color="$item->model->type->getColor()" :icon="$item->model->type->getIcon()">
{{ $item->model->type->getLabel() }} <span class="text-xs">#{{ $item->model->id }}</span>
</x-filament::badge>
@endif
@if($item->isDocument())
@php
$url = DocumentResource::getUrl('view', ['record' => $item->model->id]);
@endphp

<x-filament::badge tag="a" :href="$url" :color="$item->model->type->getColor()" :icon="$item->model->type->getIcon()">
{{ $item->model->type->getLabel() }} <span class="text-xs">#{{ $item->model->id }}</span>
</x-filament::badge>
@endif
2 replies