added liman service
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?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'];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user