orderBy('created_at', 'desc') ->get(); } public function findById(int $id): ?PaymentTransfer { return PaymentTransfer::find($id); } public function create(array $data): PaymentTransfer { return PaymentTransfer::create($data); } public function update(int $id, array $data): ?PaymentTransfer { $model = $this->findById($id); if (! $model) { return null; } $model->update($data); return $model->fresh(); } public function delete(int $id): bool { $model = $this->findById($id); if (! $model) { return false; } return $model->delete(); } // Add custom business logic methods here }