issues when installing the panel

What I am trying to do: I am trying to install the admin panel What I did: i ran: composer require filament/filament php artisan filament:install --panels My issue/the error: when running php artisan filament:install --panels it asks for and admin id. when i provide one it finished the installation but gives an error in my files and i cant acces the panel Code: In providers.php line 5: syntax error, unexpected token "", expecting "]" return [ App\Providers\AppServiceProvider::class, App\Providers\Filament\1PanelProvider::class, ];
Solution:
Possibly caused by the 1 in the PanelProvider don't think classes support numbers
Jump to solution
11 Replies
Solution
toeknee
toeknee2d ago
Possibly caused by the 1 in the PanelProvider don't think classes support numbers
dubayd
dubaydOP2d ago
yeah i saw that but it does it automaticly when it asks for an id?
toeknee
toeknee2d ago
Did you write 1 for the ID per chance? ID means the name of the panel i.e. 'client' or 'admin'
dubayd
dubaydOP2d ago
yes wasnt i supposed to?
toeknee
toeknee2d ago
No... It\s supposed to be 'client' or 'admin' for instance
dubayd
dubaydOP2d ago
it says nothing about that in de documentation but ill try it now
toeknee
toeknee2d ago
It doesn't need too, it says in the generation: Panel ID i.e. 'admin' or similar I am sure, I'll check the install command now Interesting you were allowed to start with an integer validate: fn (string $value) => match (true) { preg_match('/^[a-zA-Z].*/', $value) !== false => null, default => 'The ID must start with a letter, and not a number or special character.', }, shows it shouldn't have been allowed.
dubayd
dubaydOP2d ago
it worked thank you
No description
dubayd
dubaydOP2d ago
but i would put it in the documentation so that others wont get confused
toeknee
toeknee2d ago
It shouldn't ever happen because of the validator so surpised it worked for you
dubayd
dubaydOP2d ago
haha alr il work on my panel now thanks again!

Did you find this page helpful?