Files
new_raffles/Modules/Employee/resources/views/department/add-department-form.blade.php
2025-07-27 17:40:56 +05:45

34 lines
1.4 KiB
PHP

{{ html()->form('POST', route('department.store'))->class('needs-validation')->attributes(['novalidate'])->open() }}
@isset($department)
{{ html()->hidden('id', $department->id) }}
@endisset
<div class="card-body">
<div class="row">
<div class="col-sm-12">
<div class="mb-3">
{{ html()->label('Title')->for('title') }}
{{ html()->span('*')->class('text-danger') }}
{{ html()->text('title')->value($department->title ?? old('title'))->class('form-control')->placeholder('Enter Title')->required() }}
{{ html()->div('Please enter a title.')->class('invalid-feedback') }}
</div>
<div class="mb-3">
{{ html()->label('Slug')->for('slug') }}
{{ html()->text('slug')->value($department->slug ?? old('slug'))->class('form-control')->placeholder('Enter Department Slug') }}
</div>
<div class="mb-3">
<div class="mb-3">
{{ html()->label('Department Head')->class('form-label')->for('department_id') }}
{{ html()->select('user_id', @$userOptions, @$designation->user_id)->class('form-select choices-select')->placeholder('Select') }}
</div>
</div>
</div>
<x-form-buttons :href="route('department.index')" :label="isset($department) ? 'Update' : 'Create'" />
</div>
</div>
{{ html()->form()->close() }}