Filip
Grouping options of a Select field with a relationship.
The Select field already has the grouping options feature:
https://i.imgur.com/UchdbT0.png
But I want to use that feature in combination with a relationship.
Eg: in an Invoice Filament resource creation page, I'll have a Select field with the relationship "prices", and the prices should be grouped by their "products" which is a HasMany relationship (Products has many prices - price belongs to product), and of course the user will select the prices not the products, just like Stripe:
https://i.imgur.com/3sFS5mY.png
2 replies
Override the PHP file of database notifications drawer livewire component
I want to override the PHP file of this livewire component (database notifications drawer):
https://user-images.githubusercontent.com/14108109/273273479-ca1a171a-1c0f-4485-9e2c-3982a3bb2d3d.png
What I want is to edit the actions of the buttons on the drawer (Clear, Mark all as read...)
The class in in vendor/Filament/Notifications/src/Livewire, it's called DatabaseNotifications.php
28 replies
Wrong filament routes/conflicting routes
I don't know if it's a bug in Filament, or if it's because of misconfiguring Nginx.
So I have two Laravel applications each one has its own database, running on the same subdomain:
The first one is on:
app1.domain.local
The second one is on app1.domain.local/app2
Here is the Nginx configuration:
https://i.imgur.com/pGrZfe4.png
https://pastebin.com/ybVH84ys
On the first app, there is no problem at all.
On the second app which is at /app2, weird things happen.
It's working just fine, it's showing data from its own database, but when I create a new record, when I click on the submit button the live wire post request goes to http://app1.domain.local/livewire/update
, shouldn't it go to http://app1.domain.com/TEST/livewire/update
? and the surprise is that the record is created in the database of the first app, and the redirection after creation goes to the first app too, so basically, since I clicked on the submit button to create a record it's jumped to the first app.
Routes also default to the first app, even if I call them in the second app, I have a button for example that redirects the user to a resource create page:
When I call this one from the second app, it is expected to take me to app1.domain.local/TEST/dashboard/customers/create
, but goes to app1.domain.local/dashboard/customers/create
2 replies