feat: establish reservation portal foundation
This commit is contained in:
24
app/Domain/Identity/Models/Role.php
Normal file
24
app/Domain/Identity/Models/Role.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domain\Identity\Models;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
|
||||
class Role extends Model
|
||||
{
|
||||
protected $fillable = ['name', 'description'];
|
||||
|
||||
/** @return BelongsToMany<User, $this> */
|
||||
public function users(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(User::class);
|
||||
}
|
||||
|
||||
/** @return BelongsToMany<Permission, $this> */
|
||||
public function permissions(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(Permission::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user