Simple Schedule to seed most popular movies from https://www.themoviedb.org/
- Make sure that docker is installed on your machine
- copy the contents of
.env.example
into.env
- Run the following command to build the docker container:
docker-compose build
- After the build finishes run the following command to run the container:
docker-compose up
- When the container is running ,Open a new terminal and run the following command to to access container :
docker exec -it seeder-app bash -c "sudo -u devuser /bin/bash"
- Run
php artisan migrate:fresh --seed
to create database table and seed the movie genres. - Run
php artisan short-schedule:run
to start the schedule. - Import the file
Movie_task.postman_collection
in postman.
- Just one end point
http://localhost:8000/api/movies
- You can filter by Category_id if added as a paramater to the url.
- You can sort by rate&popular whether asc or desc.