added api to env

main
A1Gard 3 months ago
parent c91c3710f9
commit 65a74f80c8

@ -66,3 +66,4 @@ PAY_GATWAY=zarinpal
THUMBNAIL_SIZE=600x600
XLANG=false
XLANG_MAIN=en
XLANG_API_URL="http://5.255.98.77:3001"

@ -194,7 +194,7 @@ class XlangController extends Controller
define("TRANSLATE_FILE", PREFIX_PATH . 'resources/lang/' . $tag . '.json');
$file = file_get_contents(TRANSLATE_FILE);
$url = 'http://5.255.98.77:3001/json?form=en&to=' . $tag;
$url = config('app.xlang_api_url').'/json?form=en&to=' . $tag;
$client = new Client([
'headers' => ['Content-Type' => 'application/json']
@ -282,7 +282,7 @@ class XlangController extends Controller
$langs = Xlang::where('is_default', 0)->get();
$model = ($model)::where('id', $id)->firstOrFail();
// $model = Product::whereId('id',$id)->first();
$url = 'http://5.255.98.77:3001/text?form=' . config('app.xlang_main') . '&to=' . $tag;
$url = config('app.xlang_api_url').'/text?form=' . config('app.xlang_main') . '&to=' . $tag;
$client = new Client([
'headers' => ['Content-Type' => 'application/x-www-form-urlencoded']

@ -95,6 +95,7 @@ return [
'locale' => 'fa',
'xlang' => env('XLANG',false),
'xlang_main' => env('XLANG_MAIN','en'),
'xlang_api_url' => env('XLANG_API_URL','en'),
/*
|--------------------------------------------------------------------------

Loading…
Cancel
Save