protected function cleanAttributes(CleansAttributes $model)
    {
        $dirty = array_keys($model->getDirty());

        $invalidColumns = array_diff($dirty, $model->getColumnListing());

        foreach ($invalidColumns as $column) {
            unset($model->{$column});
        }
    }
protected function cleanAttributes(CleansAttributes $model)
    {
        $dirty = array_keys($model->getDirty());

        $invalidColumns = array_diff($dirty, $model->getColumnListing());

        foreach ($invalidColumns as $column) {
            unset($model->{$column});
        }
    }
protected function cleanAttributes ( CleansAttributes $ model ) { $ dirty = array_keys ( $ model -> getDirty ( ) ) ; $ invalidColumns = array_diff ( $ dirty , $ model -> getColumnListing ( ) ) ; foreach ( $ invalidColumns as $ column ) { unset ( $ model -> { $ column } ) ; } }
Get rid of attributes that are not correct columns on this model's table.

@param  \Sofa\Eloquence\Contracts\CleansAttributes $model
@return void
Get rid of attributes that are not correct columns on this model s table .