refactor blade files
This commit is contained in:
@@ -88,7 +88,7 @@ class SafetyAndPrivacyController extends Controller
|
||||
return $this->successResponse();
|
||||
}
|
||||
|
||||
public function secondStepStore(SafetyAndPrivacy $safety_and_privacy, SecondStepStoreRequest $request): JsonResponse
|
||||
public function secondStepStore(SafetyAndPrivacy $safetyAndPrivacy, SecondStepStoreRequest $request): JsonResponse
|
||||
{
|
||||
$user = auth()->user();
|
||||
|
||||
@@ -100,13 +100,13 @@ class SafetyAndPrivacyController extends Controller
|
||||
return $this->errorResponse('اداره شهری برای شما در سامانه ثبت نشده است!');
|
||||
}
|
||||
|
||||
DB::transaction(function () use ($request, $safety_and_privacy, $user)
|
||||
DB::transaction(function () use ($request, $safetyAndPrivacy, $user)
|
||||
{
|
||||
$judiciary_document = [];
|
||||
foreach ($request->judiciary_document as $index => $file) {
|
||||
$judiciary_document[] = FileFacade::save($file, "safety_and_privacy/{$safety_and_privacy->id}/judiciary_document");
|
||||
$judiciary_document[] = FileFacade::save($file, "safety_and_privacy/{$safetyAndPrivacy->id}/judiciary_document");
|
||||
}
|
||||
$safety_and_privacy->update([
|
||||
$safetyAndPrivacy->update([
|
||||
'judiciary_document' => serialize($judiciary_document),
|
||||
'judiciary_document_upload_date' => now(),
|
||||
'step' => 2,
|
||||
@@ -119,7 +119,7 @@ class SafetyAndPrivacyController extends Controller
|
||||
return $this->successResponse();
|
||||
}
|
||||
|
||||
public function thirdStepStore(SafetyAndPrivacy $safety_and_privacy, ThirdStepStoreRequest $request): JsonResponse
|
||||
public function thirdStepStore(SafetyAndPrivacy $safetyAndPrivacy, ThirdStepStoreRequest $request): JsonResponse
|
||||
{
|
||||
$user = auth()->user();
|
||||
|
||||
@@ -131,11 +131,11 @@ class SafetyAndPrivacyController extends Controller
|
||||
return $this->errorResponse('اداره شهری برای شما در سامانه ثبت نشده است!');
|
||||
}
|
||||
|
||||
DB::transaction(function () use ($request, $safety_and_privacy, $user) {
|
||||
$safety_and_privacy->update([
|
||||
DB::transaction(function () use ($request, $safetyAndPrivacy, $user) {
|
||||
$safetyAndPrivacy->update([
|
||||
'step' => 3,
|
||||
'step_fa' => 'گام سوم (برخورد)',
|
||||
'action_picture' => FileFacade::save($request->action_picture, "safety_and_privacy/{$safety_and_privacy->id}/action_picture"),
|
||||
'action_picture' => FileFacade::save($request->action_picture, "safety_and_privacy/{$safetyAndPrivacy->id}/action_picture"),
|
||||
'action_picture_document_upload_date' => now(),
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user