Rick Doetinchem
Rick Doetinchem
FFilament
Created by Rick Doetinchem on 12/24/2024 in #❓┊help
Relational data in Infolist is not shown
Found the error. Since the relationship 'replies' are accessed trough the record, there's no need to define: ->relationship('replies') I just deleted it. Works.
4 replies
FFilament
Created by Rick Doetinchem on 12/24/2024 in #❓┊help
Relational data in Infolist is not shown
Bump
4 replies
FFilament
Created by Rick Doetinchem on 12/24/2024 in #❓┊help
Richeditor undefined error
I think replyData should be empty because it's a create record form and not an edit form? I solved it by reading the docs once again. You should always initialize the form:
Initialize the form with $this->form->fill() in mount(). This is imperative for every form that you build, even if it doesn't have any initial data.
5 replies
FFilament
Created by gigiloouu on 12/24/2024 in #❓┊help
show total sum by filters
41 replies
FFilament
Created by Rick Doetinchem on 12/24/2024 in #❓┊help
Richeditor undefined error
5 replies
FFilament
Created by Rick Doetinchem on 12/18/2024 in #❓┊help
Fetch relational data in custom page
That explains it... By a group, do you mean a fieldset? can you give me an example of how you do that?
8 replies
FFilament
Created by Rick Doetinchem on 12/18/2024 in #❓┊help
Fetch relational data in custom page
When I’m using the same code with an info list personable.full_name is working. But why can’t I populate the field in edit mode in the form? What am I doing wrong?
8 replies
FFilament
Created by Rick Doetinchem on 12/17/2024 in #❓┊help
Custom page with resource record error
Okay, that doesn’t answer my question. I am curious about how to use resolveRecord() and InteractsWithRecord() correctly, as mentioned in the Filament documentation.
21 replies
FFilament
Created by Rick Doetinchem on 12/17/2024 in #❓┊help
Custom page with resource record error
No description
21 replies
FFilament
Created by Rick Doetinchem on 12/17/2024 in #❓┊help
Custom page with resource record error
Thanks Matthew! It's working but also after I deleted the use InteractsWithRecord trait. I think I used 2 separate method to retrieve the model. I have it working with Ticket::findOrFail But how do you do this if you want to use the resolveRecord with the InteractsWithRecord trait like documented in the filament documentation on https://filamentphp.com/docs/3.x/panels/resources/custom-pages#using-a-resource-record
21 replies
FFilament
Created by Rick Doetinchem on 12/17/2024 in #❓┊help
Custom page with resource record error
Maybe you have a working example for me?
21 replies
FFilament
Created by Rick Doetinchem on 12/17/2024 in #❓┊help
Custom page with resource record error
I'm trying to understand what you mean. Where do I have to run the class? and do I do that with public $ticket; ?
21 replies
FFilament
Created by Rick Doetinchem on 12/17/2024 in #❓┊help
Custom page with resource record error
I already did defined it on the class?
21 replies
FFilament
Created by Rick Doetinchem on 12/17/2024 in #❓┊help
Custom page with resource record error
This is my complete code: class TicketWithComments extends Page implements HasForms { use InteractsWithForms; use InteractsWithRecord; public ?array $data = []; public Ticket $ticket; protected static string $resource = TicketResource::class; protected static string $view = 'filament.app.resources.ticket-resource.pages.ticket-with-comments'; public function form(Form $form): Form { return $form ->schema([ TextInput::make('title') ->autofocus() ->required(), TextInput::make('personable.full_name') ->required(), ]) ->statePath('data') ->model($this->ticket); } public function mount($ticketId): void { dd($this->ticketId); $this->ticket = Ticket::findOrFail($ticketId); $this->form->fill($this->ticket->attributesToArray()); } }
21 replies
FFilament
Created by Rick Doetinchem on 12/17/2024 in #❓┊help
Custom page with resource record error
I'm sorry, but I don't understand it.
21 replies