Skip to content

Commit

Permalink
Merge pull request #9771 from amit-webkul/rest-shimmer
Browse files Browse the repository at this point in the history
Fixed Issue #9763
  • Loading branch information
jitendra-webkul committed May 14, 2024
2 parents d55c8ba + b09756e commit a318ff8
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ public function model(): string
*/
public function create(array $data)
{
$data['starts_from'] = $data['starts_from'] ?? null;
$data['starts_from'] = $data['starts_from'] ?: null;

$data['ends_till'] = $data['ends_till'] ?? null;
$data['ends_till'] = $data['ends_till'] ?: null;

$data['status'] = isset($data['status']);

Expand Down Expand Up @@ -82,8 +82,8 @@ public function create(array $data)
public function update(array $data, $id, $attribute = 'id')
{
$data = array_merge($data, [
'starts_from' => $data['starts_from'] ?? null,
'ends_till' => $data['ends_till'] ?? null,
'starts_from' => $data['starts_from'] ?: null,
'ends_till' => $data['ends_till'] ?: null,
'status' => isset($data['status']),
'conditions' => $data['conditions'] ?? [],
]);
Expand Down

0 comments on commit a318ff8

Please sign in to comment.