<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use App\Traits\ModelTimeFormat;

use App\Traits\ModelLogChanging;

class Role extends Model
{
    use ModelLogChanging;

    use ModelTimeFormat;
    protected $fillable = ['name'];
    function users(){
        return $this->belongsToMany('App\User','user_role','id_role','id_user');
    }
    function authorities(){
        return $this->belongsToMany('App\Authority','authority_role','id_role','id_authority');
    }
}
