Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

supr4yz-'s avatar

Laravel Filament "/admin" 404 not found error.

Hi. I uploaded my Laravel project to a website. To run the filament admin panel. The site is working, but when I go to /admin, I get 404 not found error.

Models/Users.php


namespace App\Models;

use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
use Filament\Models\Contracts\FilamentUser;
use Filament\Models\Contracts\HasName;


class User extends Authenticatable
{
    use HasApiTokens, HasFactory, Notifiable;

    /**
     * The attributes that are mass assignable.
     *
     * @var array<int, string>
     */
    protected $fillable = [
        'name',
        'email',
        'password',
    ];

    /**
     * The attributes that should be hidden for serialization.
     *
     * @var array<int, string>
     */
    protected $hidden = [
        'password',
        'remember_token',
    ];

    /**
     * The attributes that should be cast.
     *
     * @var array<string, string>
     */
    protected $casts = [
        'email_verified_at' => 'datetime',
    ];
    
}
class User extends Authenticatable implements FilamentUser
{
    // ...
 
    public function canAccessFilament(true): bool
    {
        return str_ends_with($this->email, '@yourdomain.com') && $this->hasVerifiedEmail();
    }
}
class User extends Authenticatable implements FilamentUser, HasName
{`
0 likes
7 replies
bipbivn's avatar

Hi @supr4yz- I have the same problem as you, did you fix this error. Please guide me how to do it Thanks!

acobrerosf's avatar

So the problem is in the actual server and not locally? How does the 404 error look like? I mean if it is the laravel page or the actual server 404 page which is blank with a black title.

1 like
bipbivn's avatar

@acobrerosf Poblem in actual server. It working well on local. I install Filament demo appliation on actual server get same error. Message Error bellow: 404 Not Found The resource requested could not be found on this server!

acobrerosf's avatar

@bipbivn It could be just an .htaccess issue not handling correctly the redirections. Did you check that?

1 like

Please or to participate in this conversation.