Skip to content

Commit

Permalink
Special Charts Convert
Browse files Browse the repository at this point in the history
  • Loading branch information
robsonvleite committed Jul 8, 2019
1 parent 4a5001d commit 9280128
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/CrudTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ protected function create(array $data): ?int
$data["created_at"] = (new DateTime("now"))->format("Y-m-d H:i:s");
$data["updated_at"] = $data["created_at"];
}
$data = filter_var_array($data, FILTER_SANITIZE_SPECIAL_CHARS);

try {
$columns = implode(", ", array_keys($data));
Expand Down Expand Up @@ -50,6 +51,7 @@ protected function update(array $data, string $terms, string $params): ?int
if ($this->timestamps) {
$data["updated_at"] = (new DateTime("now"))->format("Y-m-d H:i:s");
}
$data = filter_var_array($data, FILTER_SANITIZE_SPECIAL_CHARS);

try {
$dateSet = [];
Expand Down

0 comments on commit 9280128

Please sign in to comment.