josephjoberno/namecheap-laravel-sdk
Composer 安装命令:
composer require josephjoberno/namecheap-laravel-sdk
包简介
Laravel SDK for Namecheap API
README 文档
README
# Namecheap Laravel SDK A Laravel SDK for interacting with the Namecheap API. ## Installation You can install the package via composer: ```bash composer require josephjoberno/namecheap-laravel-sdk
Requirements
- PHP ^7.4|^8.0
- Laravel ^8.0|^9.0|^10.0
Configuration
- After installing the package, register the service provider in your
config/app.php(Laravel will auto-discover the provider in most cases):
'providers' => [ // ... Namecheap\Laravel\NamecheapServiceProvider::class, ];
- Add the facade to your aliases:
'aliases' => [ // ... 'Namecheap' => Namecheap\Laravel\Facades\Namecheap::class, ];
- .env
NAMECHEAP_API_KEY= NAMECHEAP_USERNAME= NAMECHEAP_API_USER= NAMECHEAP_CLIENT_IP= NAMECHEAP_SANDBOX=
Usage
You can use the Namecheap facade to interact with the Namecheap API:
use Namecheap\Laravel\Facades\Namecheap; // Example usage $response = Namecheap::domains()->getList();
## Available Resources ### Domains The Domains resource allows you to manage domain names through the Namecheap API. ```php use Namecheap\Laravel\Facades\Namecheap; // Get list of domains $domains = Namecheap::domains()->getList(); // Check domain availability $available = Namecheap::domains()->check('example.com'); // Register a domain $result = Namecheap::domains()->create([ 'DomainName' => 'example.com', 'Years' => 1 ]);
DNS
The DNS resource provides methods to manage DNS records for your domains.
use Namecheap\Laravel\Facades\Namecheap; // Get DNS records for a domain $records = Namecheap::dns()->getList('example.com'); // Set DNS hosts for a domain $result = Namecheap::dns()->setHosts('example.com', [ [ 'HostName' => '@', 'RecordType' => 'A', 'Address' => '192.0.2.1', 'TTL' => '1800' ] ]);
SSL Certificates
Manage SSL certificates through the Namecheap API.
use Namecheap\Laravel\Facades\Namecheap; // Get list of SSL certificates $certificates = Namecheap::ssl()->getList(); // Purchase a new SSL certificate $result = Namecheap::ssl()->create([ 'Type' => 'PositiveSSL', 'Years' => 1 ]);
Users
Manage user account information and settings.
use Namecheap\Laravel\Facades\Namecheap; // Get user address information $address = Namecheap::users()->getAddress(); // Get pricing information $pricing = Namecheap::users()->getPricing();
Whois
Query and manage WHOIS information for domains.
use Namecheap\Laravel\Facades\Namecheap; // Get WHOIS information for a domain $whois = Namecheap::whois()->getInfo('example.com'); // Update WHOIS information $result = Namecheap::whois()->update('example.com', [ 'FirstName' => 'John', 'LastName' => 'Doe', 'EmailAddress' => 'john@example.com' ]);
Each resource is accessible through the Namecheap facade and provides a clean, fluent interface to interact with the Namecheap API. For more detailed information about available methods and parameters, please refer to the Namecheap API documentation.
Features
- Easy integration with Laravel projects
- Clean and simple API interface
- Support for all Namecheap API endpoints
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Security
If you discover any security-related issues, please email josephjoberno@email.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
josephjoberno/namecheap-laravel-sdk 适用场景与选型建议
josephjoberno/namecheap-laravel-sdk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 147 次下载、GitHub Stars 达 2, 最近一次更新时间为 2024 年 11 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 josephjoberno/namecheap-laravel-sdk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 josephjoberno/namecheap-laravel-sdk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 147
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 15
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-11-16