unsa-pis-be/app/Models/Role.php
Carlos Jesus Gonzales Molina 8d135b3e8e
Rename role.php to Role.php
2022-10-22 12:38:36 -05:00

23 lines
376 B
PHP

<?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');
}
}