public function deleteFields(array $fields)
    {
        $fields = Helpers\Validate::arrToLower($fields);

        Helpers\Validate::table($this->name)->fields($fields);

        $config         = $this->config();
        $config->schema = array_diff_key($this->schema(), array_flip($fields));

        $data = $this->getData();
        foreach ($data as $key => $object)
        {
            foreach ($fields as $name)
            {
                unset($data[$key]->{$name});
            }
        }

        Helpers\Data::table($this->name)->put($data);
        Helpers\Config::table($this->name)->put($config);
    }
public function deleteFields(array $fields)
    {
        $fields = Helpers\Validate::arrToLower($fields);

        Helpers\Validate::table($this->name)->fields($fields);

        $config         = $this->config();
        $config->schema = array_diff_key($this->schema(), array_flip($fields));

        $data = $this->getData();
        foreach ($data as $key => $object)
        {
            foreach ($fields as $name)
            {
                unset($data[$key]->{$name});
            }
        }

        Helpers\Data::table($this->name)->put($data);
        Helpers\Config::table($this->name)->put($config);
    }
public function deleteFields ( array $ fields ) { $ fields = Helpers \ Validate :: arrToLower ( $ fields ) ; Helpers \ Validate :: table ( $ this -> name ) -> fields ( $ fields ) ; $ config = $ this -> config ( ) ; $ config -> schema = array_diff_key ( $ this -> schema ( ) , array_flip ( $ fields ) ) ; $ data = $ this -> getData ( ) ; foreach ( $ data as $ key => $ object ) { foreach ( $ fields as $ name ) { unset ( $ data [ $ key ] -> { $ name } ) ; } } Helpers \ Data :: table ( $ this -> name ) -> put ( $ data ) ; Helpers \ Config :: table ( $ this -> name ) -> put ( $ config ) ; }
Delete fields from array
@param array $fields Indexed array
Delete fields from array