PHP code example of mdaliyan / farsi-request
1. Go to this page and download the library: Download mdaliyan/farsi-request 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/ */
mdaliyan / farsi-request example snippets
protected $middleware = [
...
\Mdaliyan\FarsiRequest\Middleware\ReplaceArabicCharacters::class,
];
use Mdaliyan\FarsiRequest\Traits\ReplaceNumbers;
class SomeRequest extends FormRequest
{
use ReplaceNumbers;
private $mustHaveEnglishNumbers = ['id','email','phone_number'];
private $mustHaveFarsiNumbers = ['post_content','author_name'];
/**
* Determine if the user is authorized to make this request.
* @return bool
*/
public function authorize()
{
return true;
}
...