承接 ecce/laravel-weather 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ecce/laravel-weather

Composer 安装命令:

composer require ecce/laravel-weather

包简介

Laravel Weather Package

README 文档

README

The Laravel Weather Package is a powerful tool for integrating weather forecast data into your Laravel application. It allows you to fetch weather data for a given IP address, display geo-location information, and present a 5-day weather forecast along with a map for visualization.

Installation

To get started with the Laravel Weather Package, follow these steps:

  1. Configure composer.json
"minimum-stability": "dev",
  1. Install the package via Composer:
composer require ecce/laravel-weather
  1. Publish the package configuration and views:
php artisan vendor:publish --tag=laravel-weather-config
php artisan vendor:publish --tag=laravel-weather-assets
php artisan vendor:publish --tag=laravel-weather-views
  1. Configure your API key in the config/laravel-weather.php file. Visit - https://openweathermap.org/api
return [
    'api_key' => env('OPEN_WEATHER_API_KEY', ''),
];
  1. Fetch data option
use Ecce\LaravelWeather\Facades\LaravelWeather;

// Example: Fetch weather data for an IP address
$ipAddress = '123.45.67.89';
$weatherData = LaravelWeather::getDailyForecast($ipAddress);
$geoLocation = $weatherData['geoLocation'];
$forecast = $weatherData['forecast'];
  1. Visit URL Visit /weather-forecasts within your Laravel app

统计信息

  • 总下载量: 13
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-09-21