mahmudz/bangla-somoy

Convert english date/time/numbers to bangla(vice-versa) in your laravel project.

dev-master 2019-07-15 09:04 UTC

This package is auto-updated.

Last update: 2024-07-15 19:55:53 UTC


README

Latest Version on Packagist Total Downloads

This laravel package will help you to convert english date/time/numbers to bangla OR bangla date/time/numbers to english format in your laravel application.

Installation

You can install the package via composer:

composer require mahmudz/bangla-somoy

Usage in php

// Import the package at the top of your file
use Mahmudz\BanglaSomoy\BanglaSomoy;

// To convert Enlgish to Bangla
$bnTime = BanglaSomoy::toBangla('01-12-1995 Friday 01:02:12 Pm');

// To convert Bangla to English
$enTime = BanglaSomoy::toEnglish('০১-১২-১৯৯৫ শুক্রবার ০১:০২:১২ অপরাহ্ন');

Usage in blade file

Before doing that, please register facade class in config config/app.php file

// Register service provider as providers.
Mahmudz\BanglaSomoy\BanglaSomoyServiceProvider::class,

// Register class as aliases.
'BanglaSomoy' => Mahmudz\BanglaSomoy\BanglaSomoyFacade::class,
// To convert Enlgish to Bangla
{{ BanglaSomoy::toBangla('01-12-1995 Friday 01:02:12 Pm') }}

// To convert Bangla to English
{{ BanglaSomoy::toEnglish('০১-১২-১৯৯৫ শুক্রবার ০১:০২:১২ অপরাহ্ন') }}

Changelog

Please see CHANGELOG for more information what has changed recently.

Security

If you discover any security related issues, please email mahmudbappy.pri@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.