PHP code example of afrizalmy / laraindo

1. Go to this page and download the library: Download afrizalmy/laraindo library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

afrizalmy / laraindo example snippets


    // file config/app.php
    'locale' => 'id',

    'fallback_locale' => 'id',

        use Laraindo\RupiahFormat; //import

        RupiahFormat::currency(1000000);
        // Rp1.000.000
        

        @RupiahFormat(1000000)
        // Rp1.000.000
        

        use Laraindo\RupiahFormat; //import

        RupiahFormat::terbilang(1000000);
        // Satu Juta Rupiah
        

        @RupiahTerbilang(1000000)
        // Satu Juta Rupiah
        

        use Laraindo\TanggalFormat; //import

        TanggalFormat::DateIndo('1945/08/17 10:00:00')
        //Jumat, 17 Agustus 1945

        // custom format
        TanggalFormat::DateIndo('1945/08/17 10:00:00','l, j F Y H:i:s a')
        //Jumat, 17 Agustus 1945 10:00:00 pagi
        

        @DateIndo('1945/08/17 10:00:00')
        //Jumat, 17 Agustus 1945

        @DateIndo('1945/08/17 10:00:00',"l, j F Y H:i:s a")
        //Jumat, 17 Agustus 1945 10:00:00 pagi
        
sh
php artisan vendor:publish --provider='Laraindo\LaraindoServiceProvider'
config/laraindo.php