This API is created using Laravel 9.19 API Resource. It has Users, Posts and Comments. Protected routes are also added via JWT access token. In this project are used SOLID patthrn development. See the api documentation via Swagger.
- User
- Post
- Comment
- UserCommentsVotes
Clone the project via git clone or download the zip file.
Copy contents of .env.example file to .env file. Create a database and connect your database in .env file.
cd into the project directory via terminal and run the following command to install composer packages.
composer install
then run the following command to generate fresh key.
php artisan key:generate
then run the following command to create migrations in the databbase.
php artisan migrate
run the following command to install Jwt key
php artisan jwt:secret
finally run the following command to seed the database with dummy content.
php artisan db:seed
finally run the following command to seed the database with dummy content.
php artisan serve
- See
http://localhost:8000/api/doc