This is a sample project built using laravel 8 and adopting the repository design pattern architecture
This project have some features, such as:
- Basic user, post, comment implementation
- API Resource (Data Transfer Object)
- Service Layer (Business Logic Layer)
- Model Filter Tucker-Eric/EloquentFilter
- Repository Design Pattern
- User Permissions and Roles spatie/laravel-permission
- Events and Listeners
- Laravel Passport documentation
- Telescope documentation
- International Phone Number Library Propaganistas/Laravel-Phone
- Exception Handling (with Custom Error Code)
- Helpers
- Multi guard with passport
Please meet the laravel documentation here
- Clone the repository:
git clone https://github.com/locnguyen1842/laravel8-restful-api-example.git
- Change to project directory
cd laravel8-restful-api-example
- Install dependencies:
composer install
- Make a .env:
cp .env.example .env
(then add database information) - Generate an app encryption key:
php artisan key:generate
- Migrate and Seed the database :
php artisan migrate --seed