PHP code example of sandofvega / bdgeocode
1. Go to this page and download the library: Download sandofvega/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/ */
sandofvega / bdgeocode example snippets
use Sandofvega\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="Sandofvega\Bdgeocode\BdgeocodeServiceProvider"
bash
php artisan migrate