NASER & LOTFI dynamic connect to hamkar app

This commit is contained in:
gholak tala
2026-05-17 16:27:50 +00:00
parent 0ce2f9854a
commit 5bb4a36f87
2 changed files with 11 additions and 5 deletions
+3 -1
View File
@@ -2,6 +2,7 @@
namespace App\Models;
use App\Http\Controllers\Controller;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Http;
@@ -22,6 +23,7 @@ class Cnt extends Model
public function goldir_login(){
$mobile = self::where('key', 'goldir_mobile')->value('value');
$password = self::where('key', 'goldir_password')->value('value');
$goldir_base_url=Controller::Config('goldir_base_url')??'https://gold.ir';
$goldir = Http::withOptions([
'curl' => [
@@ -30,7 +32,7 @@ class Cnt extends Model
]
])
->withoutVerifying()
->post('https://gold.ir/server/auth/login', [
->post($goldir_base_url.'/server/auth/login', [
'mobile' => $mobile,
'password' => $password,
'provider' => 'customer',