tesse05
tesse05
FFilament
Created by tesse05 on 5/27/2024 in #❓┊help
custom widgets
No description
6 replies
FFilament
Created by tesse05 on 5/9/2024 in #❓┊help
spatie media library file upload load file
No description
3 replies
FFilament
Created by tesse05 on 5/9/2024 in #❓┊help
Spatie Media Library overriding files
No description
2 replies
FFilament
Created by tesse05 on 4/29/2024 in #❓┊help
custom overview page with sidebar
No description
4 replies
FFilament
Created by tesse05 on 4/25/2024 in #❓┊help
render blade in subheading?
No description
5 replies
FFilament
Created by tesse05 on 2/14/2024 in #❓┊help
inputs style
Hi there! I want to style all the inputs (i'm using only form builder), how can I achieve this? Don't know which selectors I should use... What I want is to make inptus smaller and less padding
4 replies
FFilament
Created by tesse05 on 2/1/2024 in #❓┊help
BUG: ->multiple() in SpatieMediaLibraryFileUpload not working
No description
2 replies
FFilament
Created by tesse05 on 1/29/2024 in #❓┊help
Spatie preview image?
No description
14 replies
FFilament
Created by tesse05 on 1/29/2024 in #❓┊help
SpatieMediaLibraryFileUpload not showing
I'm using Form Builder in a Livewire normal component. I have this field:
SpatieMediaLibraryFileUpload::make('main_image')
->disk('media')
->acceptedFileTypes([
'image/png', 'image/jpeg'
])
->enableDownload()
->collection('main-image'),
SpatieMediaLibraryFileUpload::make('main_image')
->disk('media')
->acceptedFileTypes([
'image/png', 'image/jpeg'
])
->enableDownload()
->collection('main-image'),
firstly, when I do submit I save the media like this:
foreach($this->main_image as $image) {
$course->addMedia($image)
->toMediaCollection('main-image','media');
}
foreach($this->main_image as $image) {
$course->addMedia($image)
->toMediaCollection('main-image','media');
}
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
use WithMedia;
public $mediaComponentNames = ['main_image'];
public $main_image;
use WithMedia;
public $mediaComponentNames = ['main_image'];
public $main_image;
but no changes are. Any thought?
18 replies
FFilament
Created by tesse05 on 1/19/2024 in #❓┊help
currency mask?
I have an input like this:
TextInput::make('amount')
->label('Import')
->mask(fn(Mask $mask) => $mask
->patternBlocks([
'money' => fn(Mask $mask) => $mask
->numeric()
->decimalPlaces(2)
->thousandsSeparator('.')
->decimalSeparator(','),
])
->pattern('money€')),
TextInput::make('amount')
->label('Import')
->mask(fn(Mask $mask) => $mask
->patternBlocks([
'money' => fn(Mask $mask) => $mask
->numeric()
->decimalPlaces(2)
->thousandsSeparator('.')
->decimalSeparator(','),
])
->pattern('money€')),
At first it shows the '€' symbol, and after trying to add a prohibitted char(like space or a letter) it shows too. But I want to show the symbol always, I mean, while I was typing.
6 replies
FFilament
Created by tesse05 on 12/14/2023 in #❓┊help
locale switcher only with form builder
HI dudes! I have an app only with form builder installed. I need to implement a locale switcher. It's possible to do the trick? And how?
1 replies
FFilament
Created by tesse05 on 11/2/2023 in #❓┊help
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??
Filter::make('available_slots')
->form([
TextInput::make('qtat')
->label('Aforament mínim')
->numeric()
])
->query(function (
Builder $query,
array $data
): Builder {
// it overrides $livewire->getTableQuery()
return $query
->when(
$data['qtat'],
function (
Builder $query,
$availableSlots,
): Builder {
return $query->having('available_slots',
'>=', $availableSlots);
});
})
Filter::make('available_slots')
->form([
TextInput::make('qtat')
->label('Aforament mínim')
->numeric()
])
->query(function (
Builder $query,
array $data
): Builder {
// it overrides $livewire->getTableQuery()
return $query
->when(
$data['qtat'],
function (
Builder $query,
$availableSlots,
): Builder {
return $query->having('available_slots',
'>=', $availableSlots);
});
})
9 replies
FFilament
Created by tesse05 on 10/19/2023 in #❓┊help
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:
->extraModalActions([
\Filament\Tables\Actions\Modal\Actions\Action::make('preview')
->button()
->label(__('filament-export::export_action.preview_action_label'))
->color('secondary')
->icon(config('filament-export.preview_icon'))
->action('openPreviewModal'),
])
->slideOver()
->extraModalActions([
\Filament\Tables\Actions\Modal\Actions\Action::make('preview')
->button()
->label(__('filament-export::export_action.preview_action_label'))
->color('secondary')
->icon(config('filament-export.preview_icon'))
->action('openPreviewModal'),
])
->slideOver()
On my RelationManager:
public function openPreviewModal(): void
{
$recordId = $this->mountedTableActionRecord;
$emailExtraInfo = $this->mountedTableActionData['email_extra_info'];
$this->dispatchBrowserEvent('open-preview-modal', ['id' =>$recordId,'field' => $emailExtraInfo]);
}
public function openPreviewModal(): void
{
$recordId = $this->mountedTableActionRecord;
$emailExtraInfo = $this->mountedTableActionData['email_extra_info'];
$this->dispatchBrowserEvent('open-preview-modal', ['id' =>$recordId,'field' => $emailExtraInfo]);
}
3 replies
FFilament
Created by tesse05 on 10/13/2023 in #❓┊help
datetimepicker enable specific dates
I have seen that its possible to disable specific dates. It's possible to enable only certain days? Or how I can disable all days from calendar except the desired days? Thanks!
2 replies
FFilament
Created by tesse05 on 8/31/2023 in #❓┊help
datetime picker multiple
its possible to make the datetimepickermultiple ? or do you know any package? I can't found anything
2 replies
FFilament
Created by tesse05 on 8/29/2023 in #❓┊help
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
FFilament
Created by tesse05 on 8/29/2023 in #❓┊help
Notifications appearing below modal backdrop
7 replies
FFilament
Created by tesse05 on 3/14/2023 in #❓┊help
Repeater with hasMany relationship
6 replies