Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Thailand Provinces Laravel Package

soap/thailand-provinces

View on GitHub
Deep Wiki
Context7

Laravel Thailand Provinces

Thailand provinces data for Laravel

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

Thailand provinces database

This database was taken from https://github.com/parsilver/thailand-provinces-php.

Installation

Add soap/thailand-provinces to composer.json.

"soap/thailand-countries": "dev-master"

Run composer update to pull down the latest version of Provinces List.

Edit app/config/app.php and add the provider and alias

'providers' => [
    'Soap\ThProvinces\ProvincesServiceProvider',
]

Now add the alias.

'aliases' => [
    'ThProvinces' => 'Soap\ThProvinces\Provinces\Facades\Provinces',
]

Model (Data)

You can start by publishing the configuration. This is an optional step, it contains the table name and does not need to be altered. If the default name provinces suits you, leave it. Otherwise run the following command

$ php artisan vendor:publish --tag=thprovinces

Next generate the migration file:

$ php artisan thprovinces:migration

It will generate the <timestamp>_create_provinces_table.php migration and the ProvincesSeeder.php seeder. To make sure the data is seeded insert the following code in the seeds/DatabaseSeeder.php

//Seed the provinces
$this->call('ProvincesSeeder');
$this->command->info('Seeded Thailand provinces!'); 

You can also run php artisan db:seed --class=ProvincesSeeder instead of adding those commands in seeds/DatabaseSeeder.php

You may now run it with the artisan migrate command:

$ php artisan migrate --seed

After running this command the filled provinces table will be available for usage in your application.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky