protected function checkMissingFields(Resource $resource)
    {
        $missing = array_diff(
            $resource->model_class::getRequiredColumns(),
            array_keys($resource->data)
        );

        if (!empty($missing)) {
            $message = "Resource '$resource->name' requires the following "
                . "missing fields: '" . implode("', '", $missing) . "'";
            $this->sendError(static::ERROR_INVALID_PAYLOAD, $message);
        }
    }
protected function checkMissingFields(Resource $resource)
    {
        $missing = array_diff(
            $resource->model_class::getRequiredColumns(),
            array_keys($resource->data)
        );

        if (!empty($missing)) {
            $message = "Resource '$resource->name' requires the following "
                . "missing fields: '" . implode("', '", $missing) . "'";
            $this->sendError(static::ERROR_INVALID_PAYLOAD, $message);
        }
    }
protected function checkMissingFields ( Resource $ resource ) { $ missing = array_diff ( $ resource -> model_class :: getRequiredColumns ( ) , array_keys ( $ resource -> data ) ) ; if ( ! empty ( $ missing ) ) { $ message = "Resource '$resource->name' requires the following " . "missing fields: '" . implode ( "', '" , $ missing ) . "'" ; $ this -> sendError ( static :: ERROR_INVALID_PAYLOAD , $ message ) ; } }
Checks if resource data fulfills the required columns

@param Resource $resource Resource

@throws RouterException If required fields are missing
Checks if resource data fulfills the required columns