Gabriel Sieben
Gabriel Sieben
Explore posts from servers
FFilament
Created by Gabriel Sieben on 2/6/2024 in #❓┊help
Is it possible to hide column names in Table Builder?
@Tieme Thank you, this is exactly what I was looking for.
7 replies
FFilament
Created by Gabriel Sieben on 10/11/2023 in #❓┊help
Database Notifications Slideover Custom Model
No problem; thank you for any help. 👍
45 replies
FFilament
Created by Gabriel Sieben on 10/11/2023 in #❓┊help
Database Notifications Slideover Custom Model
And open-sourced it on Github of course
45 replies
FFilament
Created by Gabriel Sieben on 10/11/2023 in #❓┊help
Database Notifications Slideover Custom Model
Would it work for you, later today, if I made a very simple demo app, using Filament, that demonstrated the situtation?
45 replies
FFilament
Created by Gabriel Sieben on 10/11/2023 in #❓┊help
Database Notifications Slideover Custom Model
Well, let's imagine it was Authenticatable
45 replies
FFilament
Created by Gabriel Sieben on 10/11/2023 in #❓┊help
Database Notifications Slideover Custom Model
How would I tell filament, reroute to use auth()->ninjawarrior(), for notifications?
45 replies
FFilament
Created by Gabriel Sieben on 10/11/2023 in #❓┊help
Database Notifications Slideover Custom Model
But imagine if I completely ripped out auth()->user() because, I deleted the User model. Hypothetically.
45 replies
FFilament
Created by Gabriel Sieben on 10/11/2023 in #❓┊help
Database Notifications Slideover Custom Model
No description
45 replies
FFilament
Created by Gabriel Sieben on 10/11/2023 in #❓┊help
Database Notifications Slideover Custom Model
How can I invoke @livewire('notifications') and have it refer to NinjaWarrior instead of User? I've done all the authentication myself, it should be as easy as @livewire('notifications', ['model' => auth()->ninjawarrior()], ideally... but that doesn't work. What would I do?
45 replies
FFilament
Created by Gabriel Sieben on 10/11/2023 in #❓┊help
Database Notifications Slideover Custom Model
Perhaps... ugh. I wish... OK, actually, here's probably the simplest way I can phrase my problem (sorry for any confusion): Imagine if I renamed the User model in my app to NinjaWarrior or something funny like that. How would I tell Filament to use my NinjaWarrior model?
45 replies
FFilament
Created by Gabriel Sieben on 10/11/2023 in #❓┊help
Database Notifications Slideover Custom Model
@awcodes Scrap the above then; here's another analogy that might make sense. Imagine if I have teams. I can be in multiple teams, and I can move between teams. There is such a thing as "team notifications" that I might want to send to a whole team. With the Filament panel, I the user could get notifications, but I couldn't display team notifications because the filament panel only shows User model notifications.
45 replies
FFilament
Created by Gabriel Sieben on 10/11/2023 in #❓┊help
Database Notifications Slideover Custom Model
And my database notifications (in my prior screenshot) to App\Models\Student never show up anywhere.
45 replies
FFilament
Created by Gabriel Sieben on 10/11/2023 in #❓┊help
Database Notifications Slideover Custom Model
That's the goal. Right now Filament has no idea, because everyone is the same User account and has the same username/password, that anything has changed even though my Student::currentStudent() or whatever is changing. Every student, and parent, gets the same notification panel.
45 replies
FFilament
Created by Gabriel Sieben on 10/11/2023 in #❓┊help
Database Notifications Slideover Custom Model
I don't want him to, in this case. I don't want Jonathan to see notifications for Gabriel.
45 replies
FFilament
Created by Gabriel Sieben on 10/11/2023 in #❓┊help
Database Notifications Slideover Custom Model
I am logged in as the same "User" model no matter the student I select. The "parent account" is just... not having a Student active.
45 replies
FFilament
Created by Gabriel Sieben on 10/11/2023 in #❓┊help
Database Notifications Slideover Custom Model
No description
45 replies
FFilament
Created by Gabriel Sieben on 10/11/2023 in #❓┊help
Database Notifications Slideover Custom Model
@awcodes Does that help at all? Or at least the last paragraph?
45 replies
FFilament
Created by Gabriel Sieben on 10/11/2023 in #❓┊help
Database Notifications Slideover Custom Model
Well, here's a quick sketch of what it's like. It's a learning website, so the way it works is that the User creates an account and signs in. We have an authenticated User, we can see the User's notifications, no problem. The User, on the home page, sees the option to either select a Student (and thus add a Student to their session), or browse for courses to purchase for a Student, or view grades for all their Students. It's not truly "logging in as" Student even though it very much looks like it, because all Students under that account have the same User. However, the Students should have seperate notifications than the User (because the User wants to get notified about "Payment Declined," that kind of thing, whereas Students should have seperate "Course starting in 10 minutes" warnings.) The notification panel is in the header. Right now, any notifications sent to App\Models\User get displayed, no problem. I can send notifications to App\Models\Student like you see in the table, but I can't tell @livewire('notifications') to show that model instead. I wish I could do something like @livewire('notifications', ['model' => Student::currentStudent()] or @livewire('notifications', ['model' => auth()->user()]) or similar.
45 replies
FFilament
Created by Gabriel Sieben on 10/10/2023 in #❓┊help
wire:navigate on an Action
I have noticed similar 404 behavior if you put "wire:navigate" accidentally on anything that isn't an <a> tag. For example, I've accidentally put it on a <div> containing an <a> tag and it happens. So it's likely a misplaced wire:navigate.
11 replies
FFilament
Created by Gabriel Sieben on 10/11/2023 in #❓┊help
Database Notifications Slideover Custom Model
If I can figure out where to set what model I want to display the notifications for, the rest is easy.
45 replies