prasun-packages/weather-info

There is no license information available for the latest version (1.0.5) of this package.

It provides the latest weather information for any city or geographic location in the world.

1.0.5 2023-06-14 11:12 UTC

This package is auto-updated.

Last update: 2024-04-14 13:19:46 UTC


README

Installation Steps:

  1. Open your project root folder in a terminal and run the below command to install the package;

composer require prasun-packages/weather-info --with-all-dependencies

  1. Open the config/app.php file within the project root folder and scroll down to the providers array. In that array, there should be a section for the package service providers. Add the following line of code in that section;

PrasunPackages\WeatherInfo\Providers\WeatherInfoProvider::class,

  1. To publish the configuration file into Laravel’s config folder within the project root, run the below command;

php artisan vendor:publish

  1. When you hit the above command in a terminal, you will be provided a list of all service providers registered in your application. Choose the PrasunPackages\WeatherInfo\Providers\WeatherInfoProvider and hit enter.
  2. We are using API Ninjas 2 in our package. So to run the application you need an API Key which you will get by Sign up below link;

https://api-ninjas.com

  1. Login and copy the API Key from the My Account section, add one environment variable within the .env file in your project root folder and paste the same as value;

API_NINJAS_API_KEY=[replace_with_your_api_key]

Run the application:

You are now able to access the weather-info via the below route within your application;

/weather-info

That's all! 😄 🥳

Developed and maintained by Prasun Das. ©️ All rights reserved.

Footnotes

  1. This is a Laravel custom package.

  2. This is a third-party API provider.