PHP code example of vanthao03596 / laravel-hanhchinhvn

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

    

vanthao03596 / laravel-hanhchinhvn example snippets


use Vanthao03596\HCVN\Models\Province;
use Vanthao03596\HCVN\Models\District;
use Vanthao03596\HCVN\Models\Ward;

$cities = Province::get();
$districts = District::get();
$wards = Ward::get();

use Vanthao03596\HCVN\Models\Province;

$city = Province::first();
$districts = $city->districts;
$wards = $city->wards;
bash
php artisan vendor:publish --provider="Vanthao03596\HCVN\HCVNServiceProvider"
php artisan migrate
php artisan hcvn:install