PHP code example of dazza-dev / laravel-geography

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

    

dazza-dev / laravel-geography example snippets


php artisan vendor:publish --tag="laravel-geography"

php artisan migrate
php artisan db:seed --class=GeographySeeder

use DazzaDev\Languages\Facades\Languages;

Languages::all();

use DazzaDev\Languages\Facades\Languages;

Languages::active();

use DazzaDev\Languages\Facades\Languages;

Languages::getByCode('en'); // Returns English
Languages::getByCode('eng'); // Also returns English

use DazzaDev\Languages\Facades\Languages;

Languages::activate('en');
Languages::activate('eng');

use DazzaDev\Languages\Facades\Languages;

Languages::deactivate('en');
Languages::deactivate('eng');