company creator updated
This commit is contained in:
parent
2adeb403cf
commit
9940c10a33
@ -31,6 +31,7 @@ public function __invoke(Request $request)
|
|||||||
'secret' => bin2hex(random_bytes(16)),
|
'secret' => bin2hex(random_bytes(16)),
|
||||||
'status' => 'new'
|
'status' => 'new'
|
||||||
]);
|
]);
|
||||||
|
//dd($request->all());
|
||||||
$data = $request->only('name', 'email', 'inn', 'legal_address', 'secret', 'status', 'type', 'phone');
|
$data = $request->only('name', 'email', 'inn', 'legal_address', 'secret', 'status', 'type', 'phone');
|
||||||
$company = Company::create($data);
|
$company = Company::create($data);
|
||||||
if (!$company)
|
if (!$company)
|
||||||
|
|||||||
@ -10,16 +10,19 @@
|
|||||||
@csrf
|
@csrf
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="companyType" class="form-label">Статус регистрации</label>
|
<label for="companyType" class="form-label">Статус регистрации</label>
|
||||||
<select class="form-select" @if($type) disabled @endif id="companyType" name="type" value="{{ old('type') }}">
|
@if($type)
|
||||||
@foreach($typesList as $typesItem)
|
<input type="text" class="form-control d-none" id="companyType" name="type" value="{{ $type }}">
|
||||||
<option value="{{$typesItem->name}}">{{ __($typesItem->name) }}</option>
|
@endif
|
||||||
@endforeach
|
<select class="form-select" @if($type) disabled @endif id="companyType" name="type" value="{{ old('type') }}">
|
||||||
</select>
|
@foreach($typesList as $typesItem)
|
||||||
@error('type')
|
<option value="{{$typesItem->value}}" @if($type == $typesItem->value) selected @endif>{{ __($typesItem->name) }}</option>
|
||||||
<span class="invalid-feedback d-block" role="alert">
|
@endforeach
|
||||||
<strong>{{ $message }}</strong>
|
</select>
|
||||||
</span>
|
@error('type')
|
||||||
@enderror
|
<span class="invalid-feedback d-block" role="alert">
|
||||||
|
<strong>{{ $message }}</strong>
|
||||||
|
</span>
|
||||||
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
@if($type)
|
@if($type)
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user