26 lines
775 B
PHP
26 lines
775 B
PHP
<?php
|
|
|
|
namespace App\Services;
|
|
|
|
use Illuminate\Support\Facades\Http;
|
|
use League\Flysystem\Config;
|
|
use app\services\ConfigService;
|
|
|
|
class LimanService
|
|
{
|
|
public function liman_login(){
|
|
$mobile = app(ConfigService::class)->Config('liman_mobile');
|
|
$password = app(ConfigService::class)->Config('liman_password');
|
|
|
|
$liman = Http::post('http://212.23.201.173/server/auth/login', [
|
|
'mobile' => $mobile,//شماره اکانت اپلیکیشن هنزا تو لیمان ایدی 1377
|
|
'password' => $password,
|
|
'provider' => 'customer',
|
|
'type_app' => 'client',
|
|
])->json();
|
|
|
|
app(ConfigService::class)->UpdateConfig('liman_token', $liman['token']);
|
|
return $liman['access_token'];
|
|
}
|
|
}
|