public static function filterNullValues($properties, array $allowed = null)
    {
        // If provided, only use allowed properties
        $properties = static::only($properties, $allowed);

        return array_filter(
            $properties,
            function ($value) {
                return !is_null($value);
            }
        );
    }
public static function filterNullValues($properties, array $allowed = null)
    {
        // If provided, only use allowed properties
        $properties = static::only($properties, $allowed);

        return array_filter(
            $properties,
            function ($value) {
                return !is_null($value);
            }
        );
    }
public static function filterNullValues ( $ properties , array $ allowed = null ) { // If provided, only use allowed properties $ properties = static :: only ( $ properties , $ allowed ) ; return array_filter ( $ properties , function ( $ value ) { return ! is_null ( $ value ) ; } ) ; }
Get array elements that are not null.

@param array $properties
@param array|null $allowed

@return array
Get array elements that are not null .