feat: Implement soft deletes for customer, invoice, order, and transaction models, and add customer edit and trash management to the admin panel.

This commit is contained in:
pbao9
2026-02-16 17:04:27 +07:00
parent 4dae15ffca
commit 31cbdf323f
22 changed files with 560 additions and 34 deletions
@@ -125,4 +125,15 @@ class CustomerRepository extends BaseRepository implements CustomerRepositoryInt
}
return $this->model->where($key, $value)->first();
}
public function onlyTrashed(array $relationships = [], array $withCount = [])
{
$query = $this->model->with($relationships);
if (count($withCount) > 0) {
$query = $query->withCount($withCount);
}
return $query->onlyTrashed();
}
}