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.*
composer require pyaesoneaung/laravel-myanmar-tools
Laravel | Package |
---|---|
9.x - 10.x | 3.x |
6.x - 10.x | 2.x |
📚 Read the full documentation at laravel-myanmar-tools.com
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
composer test
- A set of useful Laravel collection macros
- myanmar-phone-number-php
- Myanmar Tools (Zawgyi detection & conversion)
- Rabbit-PHP
- NRCPrefix
JetBrains support Myanmar Tools For Laravel by providing Open Source License.