PHP code example of sohel1999 / bdgeocode

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

    

sohel1999 / bdgeocode example snippets


use Sohel1999\Bdgeocode\Seeds\BdgeocodeSeeder;

class DatabaseSeeder extends Seeder
{
    public function run()
    {
        $this->call(BdgeocodeSeeder::class);
        //
    }
}

use App\District;

$districts = District::all();

use App\District;

$district = District::first(); // A district

$division = $district->division // Division for a district

$thanas = $district->thanas // All thana in a district
bash
php artisan vendor:publish --provider="Sohel1999\Bdgeocode\BdgeocodeServiceProvider"
bash
php artisan migrate