F
Filamentβ€’9mo ago
HardFist

I have problem when upload it to Share Hosting

When I upload laravel + filament to Share Hosting, when I go to domain.com/admin, it show 404. Is there something that I have to do after upload the project?
Solution:
Finally I fix it, I config the htaccess in the wrong way 😊
Jump to solution
12 Replies
Jr.Pikong
Jr.Pikongβ€’9mo ago
Make sure this code implement in User model public function canAccessPanel(Panel $panel): bool { return str_ends_with($this->email, '@yourdomain.com') && $this->hasVerifiedEmail(); } https://filamentphp.com/docs/3.x/panels/users
Dennis Koch
Dennis Kochβ€’9mo ago
Shared hosting and Laravel are often a bad combination. It's hard to tell because there might be numerous issues with the server setup
SLy
SLyβ€’9mo ago
It can work if having ssh terminal available. Your problem might be because of .htaccess, can you acces via /public/admin?
HardFist
HardFistOPβ€’9mo ago
I'll try I just have this account to make a light blog. To make this web secure I used to move the project directory in the outside of public_html I cant 😦
Jordy
Jordyβ€’9mo ago
as Dennis said, shared hosting is rubbish with laravel.. its not worth it for the money you are saving
Dennis Koch
Dennis Kochβ€’9mo ago
You need to point the virtual host to public then If you can't change the virtual host config, you will need to jump through some hoops.
HardFist
HardFistOPβ€’9mo ago
I think theres a problem when I upload it, so I reinstall the Filament via cpanel terminal. Everything goes fine even when I make filament-user. When I check the database there is my user data, but I cant access the admin page
Dennis Koch
Dennis Kochβ€’9mo ago
Can you access any Laravel route?
HardFist
HardFistOPβ€’9mo ago
Okay I will try it Yes I can, just the filament page I cant access
Jr.Pikong
Jr.Pikongβ€’9mo ago
have you tried adding this code to the User model? public function canAcces Panel(Panel $panel): bool { return true; }
HardFist
HardFistOPβ€’9mo ago
Yes I modified the User model like in Documentation and like this, still same (404)
Solution
HardFist
HardFistβ€’9mo ago
Finally I fix it, I config the htaccess in the wrong way 😊
Want results from more Discord servers?
Add your server