PHP code example of still-code / ar-php-laravel

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

    

still-code / ar-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();
 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));
 php
dump(ArPhpLaravel::translate('اهلا بالكل')); // Ahla Balkl