Skip to content

Latest commit

 

History

History
112 lines (71 loc) · 2.7 KB

README.md

File metadata and controls

112 lines (71 loc) · 2.7 KB

GitHub Workflow Status Packagist Version Packagist Downloads

Myanmar Tools For Laravel

A package for Myanmar tools which extend Laravel’s core.

  • ⚡️ Simple & Powerful
  • 🇲🇲 Include Myanmar Font, Phone Number, NRC and Date tools
  • ⚙️ Extend Str, Eloquent Builder, Query Builder, Request, Collection, Validator and Carbon
  • 🤝 Support Laravel 10.* | 9.* | 8.* | 7.* | 6.*

Installation

composer require pyaesoneaung/laravel-myanmar-tools

Version Compatibilities

Laravel Package
9.x - 10.x 3.x
6.x - 10.x 2.x

Documentation

📚 Read the full documentation at laravel-myanmar-tools.com

Basic Usage

Str

use Illuminate\Support\Str;

Str::zgToUni('ျမန္မာျပည္');

// မြန်မာပြည်

Eloquent Builder

use App\Models\Customer;

Customer::whereMpt('phone')->first();

Request

// https://{domain}.com/{path}?phone=09250000000

$request->telecomName('phone');

// mpt

Collection

$data = ['မြန်မာပြည်'];

collect($data)->uniToZg()->toArray();

// ['ျမန္မာျပည္']

Validation

$request->validate([
    'phone' => ['required', 'mpt'],
]);

Carbon

use Illuminate\Support\Carbon;

Carbon::parse('2023-07-19')->isMartyrsDay();

// true

And more...

📚 Checkout the full documentation at laravel-myanmar-tools.com

Testing

composer test

Credits

Thanks JetBrains

JetBrains support Myanmar Tools For Laravel by providing Open Source License.