edms2023/app/RoleUser.php

30 lines
451 B
PHP
Raw Permalink Normal View History

2023-09-14 20:59:46 +00:00
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class RoleUser extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'role_user';
protected $fillable = [
'user_id', 'role_id',
];
public function user()
{
return $this->belongsTo(User::class);
}
public function role()
{
return $this->belongsTo(Role::class);
}
}