Using NASA’s “Astronomy Picture of the Day” API, build a webpage that lists the picture of the day for the last 30 days.
Project is Laravel based
-
Download this project (duh)
-
composer install
-
.env file will be missing : copy .env.example as .env
-
Enter all your mysql data in the .env file
-
create the database in you mysql host
-
php artisan key:generate (Generate new project key)
-
php artisan migrate (sets up the database)
-
php artisan pictures:fill (collects pictures from nasa's apod service and fills database wait for completion)
-
php artisan pictures:getpod (this is optional it will get the latest APOD)
-
php artisan schedule:work
-
Open new teminal window in project folder
-
php artisan serve (run local)
This starts a cronjob that checks the APOD service every hour to get the latest APOD picture. Due to the fact that we don't know at what exact time the new APOD is published the server will get it automatically. Also saves a buttload of requests x__X