nathan269_
How To Call Service To Retrieve Data Within Table Widget?
Hi folks,
how can i retrieve data from a service I have setup, from within the table widget? I previously used the ->query method because I just reference data from within my database, however, i no longer save the data anymore. This is my code:
2 replies
What is the best/easiest way to overwrite a resource within a package?
I'm using the following 2 packages and would like to edit both resources:
This is the path for each:
vendor/z3d0x/filament-logger/src/Resources/ActivityResource.php
vendor/bezhansalleh/filament-exceptions/src/Resources/ExceptionResource.php
3 replies
Light/Dark Mode Logo
Hi I have the following for my logo:
although this works while logged in and switching between light and dark mode, it doesn't work when I sign out from the admin and I'm on the sign in page (that displays our logo). For example, if when signed in i was in dark mode and the light version of our logo is displayed and then I sign out and have a dark themed sign in form, the logo is no longer a light version and switches back to the dark version of the logo.
5 replies
Filament Curator (srcset not working)
Hi Folks,
I'm trying to figure out how to properly set multiple srcset/sizes for the following image:
I want a different size of image to be displayed dependent on what the current screen size is. With what I have set, no matter what screen size I have, it always sets to the largest option (2000) like so:
"http://website.test/curator/media/36ea4b52-f699-4491-b97c-e1a25e75efe0.jpg?fm=webp&h=1125&q=80&w=2000&s=edc3024d7bc5c7cc2a74cd46b56b1b09"
Have I set this wrong?
9 replies
How do I Determine What Action is Called?
Apologies if this is covered in the filament docs, however, i couldn't find anything based on this issue.
I have the following in my AuthorResource:
```
Forms\Components\TextInput::make('email')
->label('Email')
->required()
->email()
->columnSpan(['sm' => 2])
->unique(modifyRuleUsing: function (Unique $rule) {
return $rule->where('is_published', 1);
}),
and this in the EditAuthor:
Action::make('save')
->action('save')
->label(fn (EditRecord $livewire) => $livewire->getRecord()->isPublished() ? __('filament-panels::resources/pages/edit-record.form.actions.save.label')
: 'Publish')
->icon(fn (EditRecord $livewire) => $livewire->getRecord()->isPublished() ? 'heroicon-o-check-circle' : 'heroicon-o-eye'),
how can i check that if the action "save" is called, then I should apply the ->unique rule that I have set, and if anything other than action "save" don't apply the unique rule.
3 replies
How to Position Package Resources?
Hi everyone,
how would i position the resource for a package I have here within my AdminPanelProvider?
I would like to change the position of the FilamentSpatieRolesPermissionsPlugin resource by doing something similar to this if possible:
I know you can go directly into resources and just do the following:
but I wasn't sure if there is an alternative way it can be done in within AdminPanelProvider.
7 replies