PHP code example of abdomassoun / algeria-wilayas
1. Go to this page and download the library: Download abdomassoun/algeria-wilayas 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/ */
abdomassoun / algeria-wilayas example snippets
use App\Enums\WilayaEnum;
// Get all wilayas
$wilayas = WilayaEnum::all();
// Get the name of a wilaya by its code
$wilayaName = WilayaEnum::getNameByCode('01');
// Get the code of a wilaya by its name
$wilayaCode = WilayaEnum::getCodeByName('Adrar');
shell
php artisan vendor:publish --tag=seeders