PHP code example of lwwcas / laravel-countries

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

    

lwwcas / laravel-countries example snippets


$this->call(\Lwwcas\LaravelCountries\Database\Seeders\LcDatabaseSeeder::class);

bash
php artisan migrate

bash
php artisan db:seed

  php
$table->integer('lc_country_id')->unsigned();
  php
$table->foreign('lc_country_id')->references('id')->on('lc_countries');
  php
$table->tinyInteger('lc_region_id')->unsigned();
$table->foreign('lc_region_id')->references('id')->on('lc_regions');