chore(models): annotations @property (Role, User) pour l'analyse statique
Permet a Larastan (PHPStan niveau 5) de resoudre $user->role->libelle. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,10 @@ namespace App\Models;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property string $libelle
|
||||
*/
|
||||
class Role extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
@@ -12,6 +12,10 @@ use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Laravel\Sanctum\HasApiTokens;
|
||||
|
||||
/**
|
||||
* @property bool $is_active
|
||||
* @property-read Role|null $role
|
||||
*/
|
||||
class User extends Authenticatable implements FilamentUser
|
||||
{
|
||||
use HasApiTokens, HasFactory, Notifiable;
|
||||
|
||||
Reference in New Issue
Block a user