Fixes for saving a new system
This commit is contained in:
@@ -4,6 +4,10 @@
|
||||
Register System
|
||||
@endsection
|
||||
|
||||
@php
|
||||
use App\Models\{Setup,System};
|
||||
@endphp
|
||||
|
||||
@section('content')
|
||||
<form class="needs-validation" method="post" autocomplete="off" novalidate>
|
||||
@csrf
|
||||
@@ -22,8 +26,9 @@
|
||||
<span class="input-group-text"><i class="bi bi-laptop-fill"></i></span>
|
||||
<select style="width: 80%;" class="form-select @error('system_id') is-invalid @enderror" id="system" name="id" required>
|
||||
<option value=""> </option>
|
||||
@foreach (\App\Models\System::select(['systems.id','systems.name'])
|
||||
@foreach (System::select(['systems.id','systems.name'])
|
||||
->active()
|
||||
->where('id','<>',Setup::findOrFail(config('app.id'))->system_id)
|
||||
->whereRaw('id NOT IN (SELECT system_id FROM system_user)')
|
||||
->cursor() as $oo)
|
||||
<option value="{{ $oo->id }}" @if(old('id')===$oo->id)selected @endif>{{ $oo->name }}</option>
|
||||
|
Reference in New Issue
Block a user