Untitled
unknown
plain_text
4 years ago
646 B
6
Indexable
private function verifySort($sort){
$array = $this->getAttributes(new Performance());
if(isset($array[$sort])){
return $sort;
}
return null;
}
private function getAttributes($model){
$columns = $model->getFillable();
$attributes = $model->getAttributes();
$add = array_merge(array_flip($columns), $attributes);
/*foreach ($columns as $column)
{
if (!array_key_exists($column, $attributes))
{
$attributes[$column] = null;
}
}*/
$add['id'] = null;
return $add;
}Editor is loading...