ericmp
How to make all tables have same options for pagination?
Im not using admin panel, only tables pkg. How to make all tables have same options for pagination? I dont want to define it for all tables, i want to define it only in some place and then it applies to all tables of the project. How?
6 replies
How to configure reverb with filament?
i want to be able to chat in admin panel.
i installed laravel broadcasting and reverb
I, following this tutorial https://laraveldaily.com/post/configure-laravel-reverb-filament-broadcasting, did:
php artisan vendor:publish --tag=filament-config
but now i have this:
but i dont use pusher, but reverb
idk how to make it work, i tried:
then i do npm run build
but i always get in console dev tools:
131 replies
How to add header text for widget groups
I have a filament admin dashboard with some stats widgets:
stat 1 --- stat2 --- stat3 --- stat 4
stat 5 --- stat6 --- stat7 --- stat 8
i want to separate them somehow and add a header on top of them, something like:
general data:
stat 1 --- stat2 --- stat3 --- stat 4
storage data:
stat 5 --- stat6 --- stat7 --- stat 8
how would u do it? is possible with filament3?
so far i managed to create 2 different widgets. the first one is the general data one, and the other one is the storage data one. so yeah, they are separated, but i need to add a header for each.
21 replies
Add maxlength to 255 chars on TextInput by default
For all my TextInput fields, I want to set a default maximum length of 255 characters, which is the commonly used VARCHAR length for database fields.
I tried implementing this in
app/Providers/AppServiceProvider.php
:
However, I encountered an issue: if the TextInput is numeric or decimal, validation fails when the number exceeds 255.
So, I attempted to conditionally apply the maxLength only if the input is not numeric or decimal:
But this approach doesn’t work because configureUsing is called before the component is used in the code, so inputMode is always empty.
What should i do?7 replies
Filament ResetPassword notification - set locale correctly
i do:
the email i get is in english. why? im setting the app locale in catalan before sending the notification. why is sent in english?
then i saw that in my env i have:
and if i change the env to:
and i get the email in catalan.
but i dont want to change the APP_LOCALE
i want the notification to be sent in the language i set before the notification is sent. how to achieve it? i thought doing app()->setLocale('ca') would do the trick, but seems is being ignored
5 replies
How To Apply `->imageEditor` on FileUpload v2?
I want the user to be able to use the image editor when uploading an image. But in v2 is not available. What would u do to achieve to let use the image editor? Update to v3? Or is there a way i dont know that this may be achieved in v2? like somehow creating a custom component like v3? but im not sure if that can be done.
11 replies
How to Check Unique Field Names Across Sections in Nested Repeater?
The user is filling a form which creates this structure (an array of sections containing fields):
The problem is that i want the names to be unique. For the sections, is easy:
But then, for the fields:
I don't know how to specify that I want them to be unique for the current section but also in other sections
What would u do?
3 replies
Convert model method to eloquent relationship
imagine this scenario
tables:
eloquent relations:
right now, using only eloquent relations, i can know which is the latest and also which is the oldest user linked to the task.
this is how it would look like the task model but wrong for this case, since they return
?User
, but as i said, i need the methods to return eloquent relationships:
as you have noticed this is a has many relationship. and it works fine.
but my question is how to translate this into a belongs to many relationship.
as in the has many relationship case, for the belongs to many relationship i want:
- to be able to retrieve task's users as an eloquent relationship
- to be able to retrieve task's first user as an eloquent relationship
- to be able to retrieve task's oldest user as an eloquent relationship2 replies
Add Action For Table Group
Lets say i have a table of posts grouped by user_id
i want to add an action that will publish all posts of that user id.
is there a way to add an action next to the row group?
this way, id be able to publish the posts with a specific user_id at once
for this specific example seems like a scoped bulk action for grouped records. but i dont mean this. imagine that the action will be something different, like updating a user field for whatever reason. is more like a header action, but for the group, which would return, in this case, the
user_id
, and then the developer, would do whatever has to be done with that id9 replies
Multiple panels login issue
I have 2 panels
/admin
/client
the user that im testing right now can access client
, but not admin
if i login in this route /client/login
all works
but if i try to login at /admin/login
it says:
but this is wrong! the credentials DO match with our records, what happens is that the user cannot access that specific panel.
i think the message should be clearer "you cannot access this panel or something like that", or if is on purpose like this, let at least the developer modify it somehow. can i modify it in a quick way, or is rather more complicated than it seems??
thanks in advance 🚀9 replies
Add Button Action To TextColumn
Problem:
Right now, in the events table, my users want to click the row to go to the edit page of the record.
But there is a problem.
I have this TextColumn, which has a url. So if the user clicks the row, but not clicking the text, it opens the TextColumn url.
So is confusing, because they havent clicked the text of that TextColumn, therefore they don't want to navigate to that TextColumn url, they want to navigate to edit the specified record.
What I want:
So i want to instead of all the TextColumn space, create a button inside of it, so it is clear that if the user clicks the button will go where the button points to. otherwise, will go to edit the clicked row.
What I tried:
I tried to change the
->url
for ->action
:
But then, when i click it, it doesn't do anything. If i instead of ->url
I put:
but is not visible
Question:
Is there a way, without creating a custom col, to add an action in the textcolumn, making it visible & also making the ->url
action to work?10 replies