psalm-plugin-laravel/tests/Models/Role.php

22 lines
407 B
PHP
Raw Normal View History

2022-01-19 23:05:35 +01:00
<?php
declare(strict_types=1);
namespace Tests\Psalm\LaravelPlugin\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
2022-01-19 23:05:35 +01:00
final class Role extends Model
{
protected $table = 'roles';
/**
* @psalm-return BelongsToMany<User>
*/
public function users(): BelongsToMany
{
return $this->belongsToMany(User::class);
}
}