/weather-app

gets the weather from outside weather api and stores them

Primary LanguagePHP

Get Started


Following these next steps will get the app running

  • clone repo
  • composer install
  • head over to https://openweathermap.org/ and create a user
    With this user we will need to copy the api key (save this for later)
  • run the following touch database/database.sqlite (which creates the database file)
  • cp .env.example .env
  • place the previously copied key in the .env file variable called weather key
  • php artisan key generate
  • php artisan migrate
  • php artisan serve
  • Instructions on how to use the API

    The current url's that are enabled are the index and store methods


    The url for those are

    • GET api/v1/weather
    • POST api/v1/weather
      Which requires an input field date in a date format 'Y-m-d'
    • Same as post needs date PUT (should be patch) /api/v1/weather
    <h3> To have the store job working <h3>
        <p>swap out the sync value for database in the .env file</p>