Skip to content

Commit

Permalink
Allow prod users to access Filament
Browse files Browse the repository at this point in the history
  • Loading branch information
mattstauffer committed Aug 7, 2024
1 parent e889345 commit 759fbb8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
namespace App\Models;

// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Filament\Models\Contracts\FilamentUser;
use Filament\Panel;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;

class User extends Authenticatable
class User extends Authenticatable implements FilamentUser
{
use HasFactory, Notifiable;

Expand All @@ -29,4 +31,9 @@ protected function casts(): array
'password' => 'hashed',
];
}

public function canAccessPanel(Panel $panel): bool
{
return $this->email === '[email protected]';
}
}

0 comments on commit 759fbb8

Please sign in to comment.