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