#Test Task: Advertisements Backend
Notes:
- authentication: laravel sanctum (token based)
- images for advert are separated in different table, in theory, i had 3 choices:
- create "image_1", "image_2", "image_3" columns in "adverts" table, but it's not flexible, but maybe more optimized(because we do not need to do joins)
- using json formatted column, but it wouldn't have strong structure.
- separate table - sql query will be a bit complex, but it's the most flexible way(maybe in future, you will need to store image size, or image placeholder, or increase limit of images amount)
###Stack:
- framework: laravel - 9th version
- database: mysql - latest
- webserver: nginx
Project is dockerized
-
docker-compose build
-
docker-compose up -d
-
Enter php container: docker-compose exec php sh
Enter next commands:
- php artisan key:generate
- php artisan migrate
- php artisan db:seed
- php artisan storage:link