mirror of
https://github.com/danog/psalm-plugin-laravel.git
synced 2024-12-02 09:37:47 +01:00
19 lines
406 B
PHP
19 lines
406 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);
|
||
|
}
|
||
|
}
|