->RenderHook() problem in AdminPanelProvider.php | Class "Filament\View\PanelsRenderHook" not found

Hello. I had this same configuration in my last application two months ago and had no problems. For this new application I am beginning now, I wanted to have the same exact renderHook and used the same in AdminPanelProvider.php
->renderHook(
PanelsRenderHook::TOPBAR_START,
fn(): View => view('filament.settings.custom-footer'),
);
And then I have the error:
Class "Filament\View\PanelsRenderHook" not found
->renderHook(
PanelsRenderHook::TOPBAR_START,
fn(): View => view('filament.settings.custom-footer'),
);
And then I have the error:
Class "Filament\View\PanelsRenderHook" not found
It looks to me as if something is still pending to be installed, because in my previous application where it is working I can right click over the word PanelsRenderHook and click on "Go to definition" and it opens: vendor\filament\filament\src\View\PanelsRenderHook.php But with his new one it says it cannot find the definition file "Definition not found". Any ideas of what I am missing. Thank you
Solution:
Try updating. v3.2.0 is half a year old.
Jump to solution
8 Replies
Lara Zeus
Lara Zeus7mo ago
you didnt import the class:
use Filament\View\PanelsRenderHook;
use Filament\View\PanelsRenderHook;
Albert Lens
Albert LensOP7mo ago
Tks but of course I have imported the class:
use Filament\View\PanelsRenderHook;
use Filament\View\PanelsRenderHook;
And it is still not working as I mentioned. The most relevant for me, I think, is the fact that this file is missing: vendor\filament\filament\src\View\PanelsRenderHook.php which in my previous application two months ago was there and everything worked fine. I could manually copy that file from my previous project for another client but I think this is not a good solution. Thank you
Ali
Ali7mo ago
I have to agree with Albert, i'm trying to use the PanelsRenderHooks and the class seems to not be found. How can we fix this ?
Dennis Koch
Dennis Koch7mo ago
What version are you guys using? Did you try removing vendor and reinstalling?
Ali
Ali7mo ago
Yup just removed and installed again, same problem. And =>
composer info filament/filament
name : filament/filament
descrip. : A collection of full-stack components for accelerated Laravel app development.
keywords :
versions : * v3.2.0
type : library
license : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
homepage : https://github.com/filamentphp/filament
source : [git] https://github.com/filamentphp/panels.git 107113f83e044deee8632e3c5f18c0d5fdb9cd10
dist : [zip] https://api.github.com/repos/filamentphp/panels/zipball/107113f83e044deee8632e3c5f18c0d5fdb9cd10 107113f83e044deee8632e3c5f18c0d5fdb9cd10
path : C:\Users\appfi\OneDrive\Desktop\Guiddini\Filament\guiddini-online-invoice-payment\vendor\filament\filament
names : filament/filament

support
issues : https://github.com/filamentphp/filament/issues
source : https://github.com/filamentphp/filament

autoload
files
psr-4
Filament\ => src

requires
danharrin/livewire-rate-limiting ^0.3|^1.0
filament/actions self.version
filament/forms self.version
filament/infolists self.version
filament/notifications self.version
filament/support self.version
filament/tables self.version
filament/widgets self.version
illuminate/auth ^10.0
illuminate/console ^10.0
illuminate/contracts ^10.0
illuminate/cookie ^10.0
illuminate/database ^10.0
illuminate/http ^10.0
illuminate/routing ^10.0
illuminate/session ^10.0
illuminate/support ^10.0
illuminate/view ^10.0
php ^8.1
spatie/laravel-package-tools ^1.9
composer info filament/filament
name : filament/filament
descrip. : A collection of full-stack components for accelerated Laravel app development.
keywords :
versions : * v3.2.0
type : library
license : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
homepage : https://github.com/filamentphp/filament
source : [git] https://github.com/filamentphp/panels.git 107113f83e044deee8632e3c5f18c0d5fdb9cd10
dist : [zip] https://api.github.com/repos/filamentphp/panels/zipball/107113f83e044deee8632e3c5f18c0d5fdb9cd10 107113f83e044deee8632e3c5f18c0d5fdb9cd10
path : C:\Users\appfi\OneDrive\Desktop\Guiddini\Filament\guiddini-online-invoice-payment\vendor\filament\filament
names : filament/filament

support
issues : https://github.com/filamentphp/filament/issues
source : https://github.com/filamentphp/filament

autoload
files
psr-4
Filament\ => src

requires
danharrin/livewire-rate-limiting ^0.3|^1.0
filament/actions self.version
filament/forms self.version
filament/infolists self.version
filament/notifications self.version
filament/support self.version
filament/tables self.version
filament/widgets self.version
illuminate/auth ^10.0
illuminate/console ^10.0
illuminate/contracts ^10.0
illuminate/cookie ^10.0
illuminate/database ^10.0
illuminate/http ^10.0
illuminate/routing ^10.0
illuminate/session ^10.0
illuminate/support ^10.0
illuminate/view ^10.0
php ^8.1
spatie/laravel-package-tools ^1.9
Solution
Dennis Koch
Dennis Koch7mo ago
Try updating. v3.2.0 is half a year old.
Ali
Ali7mo ago
That fixed it, Thank you.
Dennis Koch
Dennis Koch7mo ago
Probably the same issue for you. Check your version and try updating. If this doesn't fix it, you can tag me.
Want results from more Discord servers?
Add your server