Follow these steps to install and run the project locally on your computer.
-
Clone repository
git clone https://github.com/Odilbukh/achievements.git
-
Go to project directory
cd path-to-project
-
Install dependencies
composer install
-
Set up environment file DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=
DB_USERNAME=
DB_PASSWORD= -
Generate application key
php artisan key:generate
-
Start migrations and populate the database
php artisan migrate php artisan db:seed
-
Start the server
php artisan serve
Your application will be available at: http://127.0.0.1:8000
- GET
/users/{user}/achievements
params: user_id - POST
/comments/create
params: [
user_id: int
text: string ] - POST
/lessons/watched
params: [
user_id: int
lesson_id: int ]
!! Use header "Accept: application/json" !!