You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

21 lines
421 B

<?php
namespace App\Entities\Users;
use Illuminate\Database\Eloquent\Model;
/**
* @author Nafies Luthfi <nafiesL@gmail.com>
*/
class UserRole extends Model
{
protected $table = 'user_roles';
public $timestamps = false;
protected $appends = ['name'];
protected $fillable = ['user_id', 'role_id'];
public function getNameAttribute()
{
return Role::getNameById($this->role_id);
}
}