|
@@ -43,7 +43,11 @@ class CompanyController extends Controller
|
|
|
return CompanyResource::collection($company);
|
|
|
}else{
|
|
|
$company=Auth::user()->company;
|
|
|
- return new CompanyResource($company);
|
|
|
+ return $this->success([
|
|
|
+ 'data' =>[
|
|
|
+ new CompanyResource($company)
|
|
|
+ ]
|
|
|
+ ]);
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -54,9 +58,9 @@ class CompanyController extends Controller
|
|
|
$company = new Company();
|
|
|
|
|
|
$company->fill([
|
|
|
+ ...$request->all(),
|
|
|
'review_status'=>CompanyReviewStatus::APPROVED,
|
|
|
- 'exp_date' => $request->exp_date === null ? Carbon::now()->addYear()->toDateString():$request->exp_date,
|
|
|
- ...$request->all(),
|
|
|
+ 'exp_date'=> $request->exp_date === null ? Carbon::now()->addYear()->toDateString():$request->exp_date,
|
|
|
]);
|
|
|
|
|
|
$company->save();
|