/** * Handle delete process * * @param $postData */ protected function processDelete($postData) { $keys = $this->getTablePrimaryKeys(); $clause = collect($postData)->only($keys)->toArray(); Queries::delete($this->getTable(), $clause); }
/** * Return the columns listed in the overrided list query * * @return array */ private function getOverridedQueryColumns() { return Queries::getQueryColumns($this->getCustomDatatableQuery()); }
/** * Return the select options from a database table * * @return array */ private function getTableOptions() { $rows = Queries::getTableRows($this->table, [$this->keyColumn, $this->descriptionColumn]); $options = collect(); foreach ($rows as $row) { $options->push($this->createOption($row->{$this->keyColumn}, $row->{$this->descriptionColumn})); } return $options->toArray(); }
public static function getTablePrimaryKeys($table) { return Queries::getTablePrimaryKeys($table); }