PHP code example of luilliarcec / laravel-ecuador-locations
1. Go to this page and download the library: Download luilliarcec/laravel-ecuador-locations 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/ */
luilliarcec / laravel-ecuador-locations example snippets
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Luilliarcec\EcuadorLocations\Seeders\CantonSeeder;
use Luilliarcec\EcuadorLocations\Seeders\ProvinciaSeeder;
use Luilliarcec\EcuadorLocations\Models\Canton;
use Luilliarcec\EcuadorLocations\Models\Provincia;
class DatabaseSeeder extends Seeder
{
public function run()
{
if (Provincia::doesntExist()) {
$this->call(ProvinciaSeeder::class);
}
if (Canton::doesntExist()) {
$this->call(CantonSeeder::class);
}
// ...
}
}
bash
php artisan vendor:publish --provider="Luilliarcec\EcuadorLocations\EcuadorLocationsServiceProvider"
bash
php artisan migrate
bash
php artisan db:seed