---
title: "Services"
canonical_url: "https://handbook.propay.co.za/laravel/services"
---
# Services

With the lean controller pattern we split our business logic out into services. These files go in the `app/Services/` directory, e.g. `app/Services/Users/UserProfileService.php`. Also remember to keep the services lean, and rather create more separate concerns than dump all the logic into a single file — that is not clean code, it just moves the problem to another file. See the [Single Responsibility Principle](https://handbook.propay.co.za/principles/single-responsibility-principle).

Example:

- Users/UserProfileService.php
- Users/UserAddressService.php
- Users/UserSubscriptionService.php
- Users/UserContactService.php

This helps a lot when passing services into jobs, which need to stay small so they process faster. Services, jobs, etc. should each have one specific responsibility.


## Sitemap

See the full [sitemap](https://handbook.propay.co.za/sitemap.md) for all pages.
