2022-07-09 03:09:04 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
2022-10-22 17:25:03 +00:00
|
|
|
class Role extends Model
|
2022-07-09 03:09:04 +00:00
|
|
|
{
|
|
|
|
use HasFactory;
|
2022-10-20 03:15:33 +00:00
|
|
|
|
|
|
|
protected $table ='roles';
|
|
|
|
|
|
|
|
protected $fillable = [
|
|
|
|
'name'
|
|
|
|
];
|
|
|
|
public $timestamps = false;
|
|
|
|
|
|
|
|
public function users(){
|
|
|
|
return $this->belongsToMany(User::class,'id_rol');
|
|
|
|
}
|
2022-07-09 03:09:04 +00:00
|
|
|
}
|