'array', 'expires_at' => 'datetime', ]; public function __construct(array $attributes = []) { parent::__construct($attributes); $this->table = config('roles.table_names.role_members') ?: parent::getTable(); } public function role() { return $this->belongsTo(Role::class); } public function member() { return $this->morphTo(); } }