PHP code example of metif12 / laravel-farsi

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

    

metif12 / laravel-farsi example snippets


echo farsi_num('123') \\ Output: ۱۲۳

echo farsi_num('۱۲۳') \\ Output: 123

Request::farsi($name,$default = null)

Request::oldFarsi($name,$default = null)

Request::postFarsi($name,$default = null)

Request::queryFarsi($name,$default = null)