1. Go to this page and download the library: Download baraear/laravel-thailand 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/ */
baraear / laravel-thailand example snippets
/*
* Package Service Providers...
*/
Baraear\ThaiAddress\ThaiAddressServiceProvider::class,
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$this->call(ThaiAddressTablesSeeder::class);
}
}
namespace App;
use Baraear\ThaiAddress\Contracts\SubDistrict as SubDistrictContract;
use Illuminate\Database\Eloquent\Model;
class SubDistrict extends Model implements SubDistrictContract
{
//
}
namespace App;
use Baraear\ThaiAddress\Contracts\District as DistrictContract;
use Illuminate\Database\Eloquent\Model;
class District extends Model implements DistrictContract
{
//
}
namespace App;
use Baraear\ThaiAddress\Contracts\Province as ProvinceContract;
use Illuminate\Database\Eloquent\Model;
class Province extends Model implements ProvinceContract
{
//
}
namespace App;
use Baraear\ThaiAddress\Contracts\PostalCode as PostalCodeContract;
use Illuminate\Database\Eloquent\Model;
class PostalCode extends Model implements PostalCodeContract
{
//
}