protected getArrayableAttributes ( ) : array | ||
return | array |
protected function getArrayableAttributes()
{
if (count($this->visible) > 0) {
return array_intersect_key($this->attributes, array_flip($this->visible));
}
return array_diff_key($this->attributes, array_flip($this->hidden));
}