amoori/ultimate-support 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

amoori/ultimate-support

Composer 安装命令:

composer require amoori/ultimate-support

包简介

A few useful reusable support package for Laravel

README 文档

README

EgoistDeveloper Laravel Support

Stable Version Unstable Version Total Downloads License

Support collection for Laravel. This package is standalone and does not require external packages.

Install

Install via Composer:

composer require laravel-ready/ultimate-support

Publish Config

php artisan vendor:publish --tag=ultimate-support-config

Support Classes

IpSupport

Contains methods for working with IP addresses.

use LaravelReady\UltimateSupport\Supports\IpSupport;

Method Description Result
isLocalhost Check client is from localhost boolean
getPublicIp Get client public IP address if it is localhost null or string
getIpAddress Get client real IP address array

getIpAddress Result

[
  "is_local" => true, // is client from localhost
  "base_ip" => "127.0.0.1", // laravel's request()->ip()
  "ip_address" => "111.111.111.111", // real client ip
]

Warning getPublicIp is uses ipify.org service and caching results for 1 day.

Note In laravel native way you can use Request::ip() method but this method is cover all cases. For example cloudflare, nginx, etc. Also see this stackoverflow question.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-04-22