fix: complete InvesteMoz validation and error corrections
This commit is contained in:
@@ -6,8 +6,10 @@ namespace App\Http\Requests;
|
||||
|
||||
use App\Models\LandAssistanceCase;
|
||||
use App\Services\CountryCatalogue;
|
||||
use App\Services\InvestmentConsumerScope;
|
||||
use App\Services\InvestmentGeography;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Validation\Validator;
|
||||
@@ -19,9 +21,14 @@ class StoreLandAssistanceCaseRequest extends FormRequest
|
||||
{
|
||||
$payload = $this->validated('payload');
|
||||
|
||||
if (!is_array($payload)) return [];
|
||||
if (!empty($payload['investor_path_case_id'])) return app(\App\Services\InvestmentConsumerScope::class)->bind($this->user(), $payload['investor_path_case_id'], $payload, $this->routeIs('land-assistance.support'));
|
||||
return \Illuminate\Support\Arr::except($payload, ['context_opportunity', 'context_opportunity_snapshot']);
|
||||
if (! is_array($payload)) {
|
||||
return [];
|
||||
}
|
||||
if (! empty($payload['investor_path_case_id'])) {
|
||||
return app(InvestmentConsumerScope::class)->bind($this->user(), $payload['investor_path_case_id'], $payload, $this->routeIs('land-assistance.support'));
|
||||
}
|
||||
|
||||
return Arr::except($payload, ['context_opportunity', 'context_opportunity_snapshot']);
|
||||
}
|
||||
|
||||
public function authorize(): bool
|
||||
|
||||
Reference in New Issue
Block a user