Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 2.94 KB

README.md

File metadata and controls

41 lines (31 loc) · 2.94 KB

Laravel Logo

Build Status Total Downloads Latest Stable Version License

About The Project

This is a simple project to implement Service-Repository Design Pattern using Laravel. To be known :

  • The repository is a layer between the domain and data layers of your application with an interface to perform create, read, update and delete CRUD operations. By using repositories in your application, you allow CRUD operations for an object to be handled by one class which can then be injected into other areas of your code.
  • Services is a layer for the business logic of your application. It simply performs the a set task (e.g. calculating a loan, updating a user) using the information provided, using any repositories or other classes you have created outside of the service.

The idea of the Repository and Service pattern are to keep the business logic (services) and the data access logic (repositories) of your app contained in their own sections. So, it's making code more readable, expandable and maintenaceable.

Built With

This section should list any major frameworks that you built your project using. Leave any add-ons/plugins for the acknowledgements section. Here are a few examples.

And supporting tools to easy testing like :

Getting Started

So, let start it.

  1. After clone this repository, just run composer update.
  2. Setup your .env file such as database connection depend on you existing device.
  3. To make sure that all dependency is run well, than run php artisan migrate to doing migration and migrate all databse that we provide in this project.
  4. Than you can run php artisan db:seed if you need seeder for user, or you can manualy register user with register endpoint.
  5. Finally, you can run your project with command: php artisan serve.
  6. Go to postman and set url like http://localhost:8000/api/, for information that port to run this project depend on configuratin on .env

Afterword

Hopefully, it can be easily understood and useful. Thank you~