psalm-plugin-laravel/tests/Models/Role.php
2022-02-10 17:45:51 +01:00

22 lines
407 B
PHP

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