tesse05
SpatieMediaLibraryFileUpload not showing
I'm using Form Builder in a Livewire normal component.
I have this field:
firstly, when I do submit I save the media like this:
At that point, media is saved successfully in the database, and attached correctly to the model.
When I refresh the page, the Spatie field looks like empty.
I have tried to add
but no changes are.
Any thought?
18 replies
Filter queries not override the eloquent query
Hi there!
I have a FIlter in my Table Builder, in which I would like to filter by a computed property setted in resource main page, eloquent query method. I have check that the query works fine at SQL editor.
When I apply the ->query() method from filter, it overrides the eloquent query and the field is not found. How to manage it??
9 replies
open modal from another modal
I follow the steps given but I don't really know how to follow... from a RelationManager where and how I attach the modal view?
https://filamentphp.com/docs/2.x/admin/pages/actions#getting-started
On my RelationTable:
On my RelationManager:
3 replies
unknown error when trying to access livewire data
I do this to access the livewire property and it throughts that error. any ideas?
https://flareapp.io/share/x7KbObBP#debug
``php
$updatedGroups = $this->mountedFormComponentActionData['groups'];
...
$seatsPerGroup = collect($updatedGroups)
->map(fn($group) => $group['seats'])
->transform(function ($seatsGroups) {
return collect($seatsGroups)
->transform(function ($group) {
$bookingGroup
= BookingGroup::find($group['booking_group_id']);
return [
'course_id' => $bookingGroup->course_id,
'seats' => $group['quantity']
];
})->groupBy('course_id')
->flatten(1);
})->flatten(1)
->groupBy('course_id')
->transform(function ($courses) {
return $courses->sum('seats');
});
$this->emit('updateGroups',[$seatsPerGroup]);
1 replies