定制 ay4t/php-helpers 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

ay4t/php-helpers

最新稳定版本:2.0.2

Composer 安装命令:

composer require ay4t/php-helpers

包简介

Fungsi helper untuk PHP

README 文档

README

Kumpulan helper PHP untuk mempermudah development aplikasi Anda.

📦 Instalasi

composer require ay4t/php-helpers

🎯 Fitur Utama

📊 Formatters

  • 📱 Phone Formatter: Format nomor telepon dengan berbagai standar
  • 💰 Currency Formatter: Format mata uang dengan berbagai opsi
  • 📅 DateTime Formatter: Format tanggal dan waktu
  • 🔄 Array Helper: Manipulasi array dengan mudah dan ekspresif

🛠️ String & File

  • 📝 String Helper: Manipulasi string dengan berbagai method
  • 📂 File Helper: Operasi file dan direktori yang aman

🔒 Security & Validation

  • 🔐 Security Helper: Hashing password, enkripsi data, dan pembuatan token
  • Validation Helper: Validasi data dengan berbagai aturan

🌐 Web

  • 🔗 URL Helper: Parsing dan manipulasi URL
  • 📄 HTML Helper: Pembuatan elemen HTML dan form builder yang aman

🛠️ Penggunaan Dasar

use Ay4t\Helper\HP;

// Phone: format internasional
$phone = HP::Phone('081234567890', 'ID')->getResult();            // "+62 812-3456-7890"

// Phone: hanya integer (MSISDN)
$msisdn = HP::Phone('081234567890', 'ID')->onlyInteger(true)->getResult(); // "6281234567890"

// Currency: format mata uang
$amount = HP::Currency(1000000, 'IDR', 2)->getResult();

// Currency: terbilang (spell-out)
$terbilang = HP::Currency(1000000, 'IDR', 2)->counted()->getResult();

// Datetime (Carbon wrapper)
$now = HP::Datetime()::now()->toDateTimeString();

// Array helper
$names = HP::Array($data)->where('status', 'active')->pluck('name');

// String helper
$slug = HP::String('Hello World!')->slugify();                      // "hello-world"

// URL helper
$url  = HP::URL('https://example.com?a=1')->addQueryParam('b', 2)->getResult();

// HTML helper
$aTag = HP::HTML()->link('https://example.com', 'Visit');

// Security helper
$hashed = HP::Security()->hashPassword('secret');

// Validation helper
$isEmail = HP::Validation('test@example.com')->isEmail();

📚 Dokumentasi

Beberapa dokumentasi tersedia:

📊 Formatters

🛠️ String & File

🔒 Security & Validation

🌐 Web

🤝 Kontribusi

Kami sangat menghargai kontribusi Anda! Silakan buat pull request atau laporkan issue jika Anda menemukan bug atau memiliki saran perbaikan.

📝 Lisensi

MIT License - lihat file LICENSE untuk detail lebih lanjut.

✨ Kredit

Dibuat dengan ❤️ oleh Ayatulloh Ahad R

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-04-28