Skip to content

This is one of the other way to make laravel project clean so it's easy to read

License

Notifications You must be signed in to change notification settings

yoviealfaguistuta/laravel-clean-architecture

Repository files navigation



Laravel Clean Architecture

This is one of the other way to make laravel project clean so it's easy to read



Implementation

This project using:

  • Form Request Validation 

  • Repository Pattern 

  • Clean Controller 

  • Swagger Documentation 

  • Testing 

Prerequisite

To run this project, what you have to prepare is:

PHP v.7.3+  Laravel 8.40  PostgreeSql 

Enable multiple extensions in the php.ini file as follows:

  • pdo_pgsql
  • fileinfo
  • pgsql
  • openssl

Adding Swagger environment variable in file .env:

L5_SWAGGER_CONST_HOST=(Laravel Server)/api

Example: L5_SWAGGER_CONST_HOST=http://127.0.0.1:8000/api


Running

If all the preparations have been made then to run it as follows:

Using bash:

./run.sh

Manual Installation:

  1. Install or update the required packages
composer update
  1. Set app key
php artisan:key generate
  1. Create table and data constants with migrations and seeders
php artisan migrate:fresh --seed
  1. Test and make sure there are no errors
php artisan test
  1. Run laravel server
php artisan serve
  1. Open a browser and copy the following address into the search field
http://127.0.0.1:8000/

Contact

Yovie Alfa Guistuta - @yoviealfa - yoviealfaguistuta@gmail.com

About

This is one of the other way to make laravel project clean so it's easy to read

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published