Skip to content

Commit bdcc3ff

Browse files
committed
Feature/localizations (#853)
1 parent 823491d commit bdcc3ff

File tree

2 files changed

+74
-0
lines changed

2 files changed

+74
-0
lines changed

phpstan.neon

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
includes:
2+
- vendor/larastan/larastan/extension.neon
3+
- vendor/nesbot/carbon/extension.neon
4+
5+
parameters:
6+
7+
paths:
8+
- packages/
9+
10+
# Level 10 is the highest level
11+
level: 5
12+
13+
# ignoreErrors:
14+
# - '#PHPDoc tag @var#'
15+
#
16+
# excludePaths:
17+
# - ./*/*/FileToBeExcluded.php

src/Models/TestUser.php

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<?php
2+
3+
namespace Moox\DevTools\Models;
4+
5+
// use Illuminate\Contracts\Auth\MustVerifyEmail;
6+
use Filament\Models\Contracts\FilamentUser;
7+
use Filament\Panel;
8+
use Illuminate\Database\Eloquent\Factories\HasFactory;
9+
use Illuminate\Foundation\Auth\User as Authenticatable;
10+
use Illuminate\Notifications\Notifiable;
11+
12+
class TestUser extends Authenticatable implements FilamentUser
13+
{
14+
/** @use HasFactory<\Workbench\Database\Factories\UserFactory> */
15+
use HasFactory, Notifiable;
16+
17+
/**
18+
* The attributes that are mass assignable.
19+
*
20+
* @var list<string>
21+
*/
22+
protected $table = 'users';
23+
24+
protected $fillable = [
25+
'name',
26+
'email',
27+
'password',
28+
];
29+
30+
/**
31+
* The attributes that should be hidden for serialization.
32+
*
33+
* @var list<string>
34+
*/
35+
protected $hidden = [
36+
'password',
37+
'remember_token',
38+
];
39+
40+
/**
41+
* Get the attributes that should be cast.
42+
*
43+
* @return array<string, string>
44+
*/
45+
protected function casts(): array
46+
{
47+
return [
48+
'email_verified_at' => 'datetime',
49+
'password' => 'hashed',
50+
];
51+
}
52+
53+
public function canAccessPanel(Panel $panel): bool
54+
{
55+
return true;
56+
}
57+
}

0 commit comments

Comments
 (0)