at92
at92
FFilament
Created by at92 on 3/28/2024 in #❓┊help
Call to a member function getPlugin() on null despite having a default panel
Fresh install of Filament and tried to install this plugin https://filamentphp.com/plugins/croustibat-jobs-monitor. I've searched here on discord and I've found multiple people saying I need to set the panel as default. The fresh install already sets the panel as default. This is the code: https://pastebin.com/QAEfmDKR What am I doing wrong?
4 replies
FFilament
Created by at92 on 7/31/2023 in #❓┊help
Unable to dispatch/listen event from Action
I'm unable to dispatch and/or listen to a Livewire event from an Action. I have a resource with a table and a custom action that looks like this:
Action::make('switchTeam')
->label(__('Switch team'))
->icon('heroicon-s-arrow-right-circle')
->color('gray')
->action(function (Team $team) {
// Something happens here
})
->dispatch( 'switchedTeam' )
Action::make('switchTeam')
->label(__('Switch team'))
->icon('heroicon-s-arrow-right-circle')
->color('gray')
->action(function (Team $team) {
// Something happens here
})
->dispatch( 'switchedTeam' )
I then have a custom livewire component that I've loaded through render hooks inside the header bar next to the user's menu. In the component I've tried the following methods but nothing is being fired. 1st test:
protected $listeners = [
'switchedTeam' => 'fireEvent',
];
protected $listeners = [
'switchedTeam' => 'fireEvent',
];
2nd test:
#[On('switchedTeam')]
public function fireEvent() {
Log::info('fireEvent');
}
#[On('switchedTeam')]
public function fireEvent() {
Log::info('fireEvent');
}
But nothing is happening. What am I doing wrong? Thanks 🙏
5 replies
FFilament
Created by at92 on 7/23/2023 in #❓┊help
[v3] Can panels be related to a model?
I'm looking to develop an app with multiple panels. The "main" panel is where users create projects and manage other minor things. Each project would then have have it's own panel with all the resources related to the project. The "project's panel" would be on an url like project/uuid if that makes sense. Is this possible with v3? Thank you 🙏
8 replies