unsa-pis-be/app/Models/role.php

23 lines
376 B
PHP
Raw Normal View History

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class role extends Model
{
use HasFactory;
protected $table ='roles';
protected $fillable = [
'name'
];
public $timestamps = false;
public function users(){
return $this->belongsToMany(User::class,'id_rol');
}
}