Skip to content

Commit 441a09c

Browse files
authored
Merge pull request #4371 from ashleyshenton/implement-filament-user
[3.x] Implement the filament user contract
2 parents b5fde23 + 090ce6c commit 441a09c

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Here are some useful quick links:
4242

4343
To test out the v3 demo, you can log in to the [Cachet dashboard](https://v3.cachethq.io/dashboard) with the following credentials:
4444

45-
- **Email:** `test@example.com`
45+
- **Email:** `test@test.com`
4646
- **Password:** `test123`
4747

4848
> **Note**

app/Models/User.php

+8-1
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@
1212
namespace App\Models;
1313

1414
// use Illuminate\Contracts\Auth\MustVerifyEmail;
15+
use Filament\Models\Contracts\FilamentUser;
16+
use Filament\Panel;
1517
use Illuminate\Database\Eloquent\Factories\HasFactory;
1618
use Illuminate\Foundation\Auth\User as Authenticatable;
1719
use Illuminate\Notifications\Notifiable;
1820
use Laravel\Sanctum\HasApiTokens;
1921

20-
class User extends Authenticatable
22+
class User extends Authenticatable implements FilamentUser
2123
{
2224
use HasApiTokens;
2325
use HasFactory;
@@ -53,4 +55,9 @@ class User extends Authenticatable
5355
'email_verified_at' => 'datetime',
5456
'password' => 'hashed',
5557
];
58+
59+
public function canAccessPanel(Panel $panel): bool
60+
{
61+
return true;
62+
}
5663
}

0 commit comments

Comments
 (0)