public static function prepareParams(array $param){

        $fillable = static::getInstance()->getFillables();

        foreach($param as $key => $value){
            if(!in_array($key, $fillable)){
                unset($param[$key]);
            } elseif(!$value){
                unset($param[$key]);
            }
        }

        return $param;
    }
public static function prepareParams(array $param){

        $fillable = static::getInstance()->getFillables();

        foreach($param as $key => $value){
            if(!in_array($key, $fillable)){
                unset($param[$key]);
            } elseif(!$value){
                unset($param[$key]);
            }
        }

        return $param;
    }
public static function prepareParams ( array $ param ) { $ fillable = static :: getInstance ( ) -> getFillables ( ) ; foreach ( $ param as $ key => $ value ) { if ( ! in_array ( $ key , $ fillable ) ) { unset ( $ param [ $ key ] ) ; } elseif ( ! $ value ) { unset ( $ param [ $ key ] ) ; } } return $ param ; }
Prepare input for query

@param array $param
@return array
Prepare input for query