mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-01-17 10:08:05 +00:00
21 lines
650 B
PHP
21 lines
650 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Api\Admin;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\PhoneCountry;
|
|
|
|
class PhoneCountryController extends Controller
|
|
{
|
|
public function activate(string $code)
|
|
{
|
|
$phoneCountry = PhoneCountry::where('code', $code)->firstOrFail();
|
|
return PhoneCountry::where('country_code', $phoneCountry->country_code)->update(['activated' => true]);
|
|
}
|
|
|
|
public function deactivate(string $code)
|
|
{
|
|
$phoneCountry = PhoneCountry::where('code', $code)->firstOrFail();
|
|
return PhoneCountry::where('country_code', $phoneCountry->country_code)->update(['activated' => false]);
|
|
}
|
|
}
|