PHP code example of dizatech / helper

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

    

dizatech / helper example snippets


$national_code = str_pad($code, 10, '0', STR_PAD_LEFT);



namespace App\Http\Requests;

use Dizatech\Helper\Rules\NationalCode;
use Illuminate\Foundation\Http\FormRequest;

class MyRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'national_code' => ['

public function handleForm(Request $request)
{
    if ($request->has('national_code')) {
        $request->merge(
            ['national_code' => str_pad($this->national_code, 10, '0', STR_PAD_LEFT)]
        );
    }
    $rules = [
        'national_code' => ['

'locale' => 'fa'
bash
php artisan vendor:publish --provider=Dizatech\Helper\DizatechHelperServiceProvider
bash
php artisan vendor:publish --provider=Dizatech\Helper\DizatechHelperServiceProvider