38 lines
828 B
PHP
38 lines
828 B
PHP
<?php
|
|
|
|
namespace App\Services;
|
|
|
|
use App\Helpers\ApiResponse;
|
|
use App\Models\MemberCompany;
|
|
use App\Models\Products\CommonCode;
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
class ProductService
|
|
{
|
|
|
|
/**
|
|
* 회원 조회(리스트)
|
|
*/
|
|
public static function getCategory(string $userToken, bool $debug = false)
|
|
{
|
|
$query = CommonCode::where('code_group','category')->where('parent_id',null);
|
|
|
|
return ApiResponse::response('get', $query, true);
|
|
}
|
|
|
|
public static function getMyInfo($request, bool $debug = false)
|
|
{
|
|
|
|
$member = $request->user();
|
|
$company = MemberCompany::where('mc_num',$member->tn_num)->first();
|
|
$data=[
|
|
'member' => $member,
|
|
'company' => $company
|
|
];
|
|
|
|
return ApiResponse::response('result', $data, $debug);
|
|
}
|
|
|
|
|
|
}
|