PHP code example of saber13812002 / persian-php-laravel

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

    

saber13812002 / persian-php-laravel example snippets


Model::searchAr('content','فلسطين')->get();

DB::table('table_name')->searchAr('content','فلسطين')->get();

DB::table('table_name')->searchAr('content','فلسطين','OR')->get();

DB::table('table_name')->orderAr('content','فلسطين')->get();
bash
composer 
 php
dump(ArPhpLaravel::int2str(123)); // مئة و ثلاثة و عشرون
dump(ArPhpLaravel::str2int('مئة و ثلاثة و عشرون')); // 123
 php
dump(ArPhpLaravel::en2ar('google')); // غوغل
dump(ArPhpLaravel::ar2en('خالِد الشَمعَة')); // Khalid Ash-Sham'ah
 php
dump(ArPhpLaravel::isFemale('محمد')); // false
 php
dump(ArPhpLaravel::guessGender('محمد')); // Male
 php
dump(ArPhpLaravel::strtotime('الخميس القادم', time(), 'l dS F Y'))); // Thursday 13th May 2021
 php
dump(ArPhpLaravel::arSentiment(TEXT));
 php
dump(ArPhpLaravel::standard(TEXT));
 php
dump(ArPhpLaravel::arSummary(TEXT));
 php
dump(ArPhpLaravel::money2str(123, 'SAR', 'ar')); // مئة و ثلاثة و عشرون ريالا
dump(ArPhpLaravel::money2str(123, 'SAR', 'en')); // 123 Riyal
dump(ArPhpLaravel::money2str(123, 'EGP', 'ar')); // مئة و ثلاثة و عشرون جنيها
 php
dump(ArPhpLaravel::int2indic(123)); // ١٢٣
 php
dump(ArPhpLaravel::utf8Glyphs(1229));