定制 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
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固