Division, District, Upazila/Thana and Union data of Bangladesh for Laravel application.

Overview

Bangladesh Geocode

Division, District, Upazila/Thana and Union data of Bangladesh for Laravel application. Migration and seeders are ready. Just publish migrations and seeders and then migrate the db and run the seed command.

Do not hesitate to share your thought, create issue or send pull request.

Total Downloads Packagist License Latest Stable Version GitHub stars GitHub forks

Laravel Version Compatibility

Laravel Package
5.5.x 0.4.x
5.6.x 0.4.x
5.7.x 0.4.x
5.8.x 0.4.x
6.x.x 0.4.x
7.x.x 0.4.x
8.x.x 0.5.x

Installation

You can install the package via composer:

composer require lemonpatwari/bangladeshgeocode

Laravel uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

Laravel without auto-discovery:

php artisan vendor:publish --provider="lemonpatwari\bangladeshgeocode\BangladeshGeocodeServiceProvider"

#If you need to overrride previously published migrationa and seeders
php artisan vendor:publish --provider="lemonpatwari\bangladeshgeocode\BangladeshGeocodeServiceProvider" --force

Publish Migration and seeders

You can publish migration and seeders via single command:

php artisan geolocation:install

You can publish migration and seeders via different command:

php artisan migrate

composer dump-autoload

php artisan db:seed --class=DivisionSeeder
php artisan db:seed --class=DistrictSeeder
php artisan db:seed --class=ThanaSeeder
php artisan db:seed --class=UnionSeeder

Usage

use lemonpatwari\bangladeshgeocode\Models\Division;
use lemonpatwari\bangladeshgeocode\Models\District;
use lemonpatwari\bangladeshgeocode\Models\Thana;
use lemonpatwari\bangladeshgeocode\Models\Union;

$divisions = Division::all();
$districts = District::all();
$thanas = Thana::all();
$union = Union::all();

$divisions = Division::with('districts')->get(); // districts hasMany
$districts = District::with('division','thanas')->get(); //division belongsTo and thanas hasMany
$thanas = Thana::with('district','unions')->get(); //district belongsTo and unions hasMany;
$union = Union::all();

$district = District::find(1);
$thanas = $district->thanas;

//Use any Laravel model functions...

Security

If you discover any issues, please email [email protected] / [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

You might also like...
Laravel Angular Time Tracker is a simple time tracking application built on Laravel 5.2, Angular 2, and Bootstrap 3.

Laravel 5.2, Angular 2, and Bootstrap 3.3.* Time Tracker Laravel Angular Time Tracker is a simple time tracking application built on Laravel 5.2, Angu

Add instagram feed to page from JSON Data
Add instagram feed to page from JSON Data

Custom Instagram Feed Add instagram feed to page from URL ๐Ÿšง Edit - As of 13th April 2021 - This code does not work. Solution is being looked into, ho

Demo of using geo data in PHP web applications

phpgeo-demo Demo of using geo data in PHP web applications Goals Demonstrate basic data storage and retrieval methods using Geo specific data Orient t

An Online Movie Booking Website whose data is completely from a database

An Online Movie Booking Website whose data is completely from a database to ensure that it can be implemented in a real time scenario as any change of data needs to be done only in the database using SQL queries and the changes are immediately reflected.

Sign URLs with expiration date to transfer data between projects.

SafeLink Framework-agnostic, lightweight URL signer. You can use SafeLink to transfer data between projects. Sign the url in project 1: use Alfatron\S

Reporter - ๐Ÿ“Š Export Craft data as CSVs in a snap
Reporter - ๐Ÿ“Š Export Craft data as CSVs in a snap

Reporter ๐Ÿ“Š Export Craft data as CSVs in a snap! โšก๏ธ Features ๐ŸŽ Reports are processed with Query Batching, making exports run quickly and without exha

A feed parser to normalise typical feed data into Atom-like constructs.

PHP5 Feed parser and normaliser A feed parser to normalise typical feed data into Atom-like constructs. This parser supports / will support: RSS 2.0 p

TinyFileManager is web based file manager and it is a simple, fast and small file manager with a single file, multi-language ready web application
TinyFileManager is web based file manager and it is a simple, fast and small file manager with a single file, multi-language ready web application

TinyFileManager is web based file manager and it is a simple, fast and small file manager with a single file, multi-language ready web application for storing, uploading, editing and managing files and folders online via web browser. The Application runs on PHP 5.5+, It allows the creation of multiple users and each user can have its own directory and a build-in support for managing text files with cloud9 IDE and it supports syntax highlighting for over 150+ languages and over 35+ themes.

OpenEMR is a Free and Open Source electronic health records and medical practice management application

OpenEMR is a Free and Open Source electronic health records and medical practice management application. It features fully integrated electronic health records, practice management, scheduling, electronic billing, internationalization, free support, a vibrant community, and a whole lot more. It runs on Windows, Linux, Mac OS X, and many other platforms.

Owner
Lemon Patwari
Hi! I am Lemon Patwari, a fullstack web app developer focused on crafting great web experiences. Designing and Coding have been my passion.
Lemon Patwari
Emoncms is an open-source web application for processing, logging and visualising energy, temperature and other environmental data and is part of the OpenEnergyMonitor project.

Emoncms is an open-source web application for processing, logging and visualising energy, temperature and other environmental data and is part of the OpenEnergyMonitor project.

Emoncms 1.1k Dec 22, 2022
A Zabbix 5.4 module to group items under Monitoring -> Latest data per Tag as it used to be with Application grouping in previous versions of Zabbix

zabbix-module-latest-data Written according to Zabbix official documentation https://www.zabbix.com/documentation/current/manual/modules A Zabbix 5.4

BGmot 18 Dec 6, 2022
Scope your application's data by (sub-)domain.

This package adds domain-scoped content to your application. Content will be available based on the current (sub)-domain allowing "multiple" websites to run off the same code base.

Snoeren Development 2 Jan 3, 2023
Damn Vulnerable Web Application (DVWA) is a PHP/MySQL web application that is damn vulnerable.

Damn Vulnerable Web Application (DVWA) is a PHP/MySQL web application that is damn vulnerable. Its main goal is to be an aid for security professionals to test their skills and tools in a legal environment, help web developers better understand the processes of securing web applications and to aid both students & teachers to learn about web application security in a controlled class room environment.

Robin Wood 7k Jan 5, 2023
This application is a simple application to watch movies like Netflix or DisneyPlus.

Movie Streaming React Web Apps This application is a simple application to watch streaming movies like Netflix or DisneyPlus. The application is built

Adim 2 Sep 25, 2022
The objective of this project is to manage The Website Manga, this site permits to Client to show, read and download Manga with the possibility to react, vote, and save his data.

The objective of this project is to manage The Website Manga, this site permits to Client to show, read and download Manga with the possibility to react, vote, and save his data.

Reda Ennakouri 5 Nov 23, 2022
A framework for building rich, data-driven applications in PHP and MySQL

Xataface A framework for building rich, data-driven applications in PHP and MySQL License GPL Requirements PHP 5.2 or higher MySQL 5 or higher Install

Steve Hannah 129 Dec 13, 2022
Retrieve MySejahtera App's data from MySejahtera API and show to users via web browser. Written in PHP

MySejahtera-PHP-Web Retrieve MySejahtera App's data from MySejahtera API and show to users via web browser. Written in PHP. Disclaimer This web app is

Sam Sam 3 Oct 21, 2022
Rafa Cake and Bakery is a web-based application project that aims to introduce Rafa Cake and Bakery, introduce what products are sold and can also order them via Whatsapp.

Rafa-cake-and-bakery Rafa Cake and Bakery is a web-based application project that aims to introduce Rafa Cake and Bakery, introduce what products are

Aan Evian Nanda 2 Jun 19, 2022
Kyle is a web application built with Laravel for web developers and small companies to efficiently track and stay on top of yearly expenses related to services

Kyle Kyle is a web application built with Laravel for web developers and small companies to efficiently track and stay on top of yearly expenses relat

Laravelista 36 Jul 15, 2022