The service class is a concept in which the application or business logic of an application is placed in dedicated classes. In this lesson, I’ll show you how to implement the service class pattern in Adonis.
What you'll learn
- How to use service classes with static methods
- How to use service classes with instance methods
- How to automatically create instance of a service class using the
inject
decorator - How to create a singleton service class