prasun-packages/weather-info
最新稳定版本:1.0.5
Composer 安装命令:
composer require prasun-packages/weather-info
包简介
It provides the latest weather information for any city or geographic location in the world.
README 文档
README
Installation Steps:
- 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
- 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,
- To publish the configuration file into Laravel’s config folder within the project root, run the below command;
php artisan vendor:publish
- 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.
- 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;
- 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
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2023-06-13