2024-06-18 00:41:12 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
|
|
|
|
class UserRole extends Model
|
|
|
|
{
|
|
|
|
use HasFactory;
|
|
|
|
|
2024-07-20 19:52:36 -04:00
|
|
|
/**
|
|
|
|
* The relationship between a user role and users.
|
2024-09-11 23:08:58 -04:00
|
|
|
*
|
|
|
|
* @return HasMany<User>
|
2024-07-20 19:52:36 -04:00
|
|
|
*/
|
2024-06-18 00:41:12 -04:00
|
|
|
public function users(): HasMany
|
|
|
|
{
|
2024-09-11 15:09:27 -04:00
|
|
|
return $this->hasMany(User::class)
|
|
|
|
->chaperone();
|
2024-06-18 00:41:12 -04:00
|
|
|
}
|
|
|
|
}
|