Veur
Customizing Notification position & styling on the fly
Is there a way to change the position and styling of a Notification when sending it, instead of globally in a Service Provider?
I have different types of notifications I'd like to display:
1. Notification about a form that is saved (top center)
2. Event Notifications, "You received a new message", for example (top right)
Is this possible in v3?
5 replies
Testing Repeater component
I'm trying to test a Repeater component: https://filamentphp.com/docs/3.x/forms/fields/repeater#testing-repeaters
It says I should add
$undoRepeaterFake = Repeater::fake();
at the beginning of the test.
But the fake()
method doens't exist on the Repeater component class:
Method Filament\Forms\Components\Repeater::fake does not exist.
Any idea what I'm missing?4 replies
Get the records of a Table (with filters applied)
Using the
InteractsWithPageTable
trait I am able to retrieve any table query and get the list of records. But it does not have the filters & sorting applied. Anybody knows how to get the query including the filters (which are persisted in the session)?
This dumps a list of all records of the table, instead of only the records that are visible in the table with the applied filters.2 replies
CreateOptionForm is not showing
I have a working form that contains a select field to set a user's
city_id
. I'm trying to add a createOptionForm, but the modal won't show up (but there is network activity, see video).
I'm on the latest Filament version, and the form is loaded in a custom Livewire component (outside a Panel).
This is the code of the form:
And the relationship in the User model:
BTW: the form is loaded in a https://wire-elements.dev/pro SlideOver from @Philo5 replies
TextColumn with subquery value
I have a Filament Table (outside a panel) listing records from a relationship.
In the select statement of the query I added a subquery, which counts a certain number of records.
But the value from the subquery isn't displayed in the table. While I see the attribute has a value when I
dd()
the query.
Any ideas? Below is the $table code:
1 replies
Custom theme: Unable to locate file in Vite manifest
I created a custom theme according to: https://filamentphp.com/docs/3.x/panels/themes#creating-a-custom-theme
Then I registered it in the Panel provider:
->viteTheme('resources/css/filament/client/theme.css')
This is my vite.config.js:
And I ran npm run build
But in production it still gives this error (locally it works fine):
Unable to locate file in Vite manifest: resources/css/filament/client/theme.css
11 replies
CreateOptionForm is not showing
I have a working form that contains a select field to set a user's city_id. I'm trying to add a createOptionForm, but the modal won't show up (but there is network activity, see video).
This is the code of the form:
And the relationship in the User model:
7 replies
Show Filament Table/Form inside an Infolist tab?
Hi, is there a way to load a Filament Table or Form inside an Infolist tab?
I saw the option to create a Custom Entry class: https://filamentphp.com/docs/3.x/infolists/entries/custom#custom-classes
But these classes extend the
Filament\Infolists\Components\Entry
class, which is not a Livewire class. Can somebody point me in the right direction (or tell me it's not possible 😆 )?4 replies
Upgrading from v2 to v3: dependencies issue
I am trying to upgrade to v3 from an existing v2 project, and I'm following the https://filamentphp.com/docs/3.x/panels/upgrade-guide
I followed all instructions, but when I run
composer update
I get this list of errors (see attachment).
I did not install Livewire v3 yet, as recommended in the Filament upgrade guide ("Please upgrade Filament before upgrading to Livewire v3").
Am I missing something?4 replies
Access 1 Filament panel via multiple domains
I want to host a Filament panel on multiple domains. My panel config looks like this:
The login screen loads fine on both domains. But when I try to login from domain1, I'm redirect to the login screen of domain2.
Logging in from domain2 works fine.
Is it possible to get it to work on both domains?
6 replies
Custumize panel per tenant with spatie/laravel-multitenancy
Hi, is there a way to configure a panel based on the current tenant (which is loaded by the current domain name)?
I am using ‘spatie/laravel-multitenancy’ and I tried to access app(‘currentTenant’) in my panel’s service provider, but the currentTenant is not yet bound to the container by then.
5 replies
How to create a sub-resource
Hi, I'm trying to create a sub-resource for one of my resources.
The parent resource is
WebsiteResource
and the sub-resource is PageResource
.
The WebsiteResource
is accessible from /websites
. I want the sub-resource to be accessible through /websites/1/pages
(for the list of pages) and /websites/1/pages/1
(for the view of Page:1).
I tried to accomplish this with the code below in the sub-resource, but it's giving me a Illuminate\Routing\Exceptions\UrlGenerationException
(missing parameter):
2 replies
Reordering records with order record in a pivot table
I have a
texts
and categories
table. The Text
model has a belongsToMany
relationship with the Category
model.
The pivot table category_text
has a sort
column.
Is there a way to reorder the table and store the order in the pivot table?
At the moment I get this error:
2 replies