dev7
dev7

Reputation: 183

Using php locale class in laravel

I am trying to get full country name from country code, i.e. US to United States

<?php

namespace App\Console\Commands;

use DB;
use Illuminate\Console\Command;
use App\Classes\ImportexportDomains;
use App\Accounts;
use App\Settings;
use Locale;

class SyncCalls extends Command {

protected $name = 'sync:calls';

public function fire() {

 $inbound_originating_address_region_full = Locale::getDisplayRegion('-'.$inbound_originating_address_region, 'en');
}
}

On running I get this error:

PHP Fatal error:  Class 'Locale' not found in /srv/users/serverpilot/apps/nanohost/app/Console/Commands/SyncCalls.php on line 235


 [Symfony\Component\Debug\Exception\FatalErrorException]  
 Class 'Locale' not found                                 

Upvotes: 1

Views: 2645

Answers (1)

Alex
Alex

Reputation: 197

Open php.ini file in c:\xampp\php folder. Find ';extension=intl' and remove semi-colon. Restart Apache. That's all.

Upvotes: 3

Related Questions