PHP code example of ixudra / render

1. Go to this page and download the library: Download ixudra/render 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/ */

    

ixudra / render example snippets



    'providers'     => array(

        //...
        Ixudra\Render\RenderServiceProvider::class,

    ),



    'facades'       => array(

        //...
        'Render'        => Ixudra\Render\Facades\Render::class,

    ),



    // Set the locale of the rendering engine so you don't have to repeat it all the time. This will remain set until manually changed
    Render::setLocale('en');


    // Translate the message in the app default app locale
    Render::translate('your.key.goes.here');

    // Translate the message recursively in a given locale - see my ixudra/translation package for details on recursive translations
    Render::recursive('admin.menu.title.new', array('model' => 'user'), true, $locale);


    // Display a date in the default app locale 
    Render::date( '02/06/15', 'd/m/y' );

    // Display a date in a specific locale 
    Render::date( '02/06/15', 'd/m/y', 'en' );


    // Display a value as currency in the default app locale 
    Render::currency( 5123.6598 );              // Returns € 5.123,65

    // Display a value as currency in a specific locale - COMING SOON
    Render::currency( 5123.6598, 'us' );        // Returns $ 5.123,65