help desk create view

This commit is contained in:
merdan 2020-05-01 16:32:41 +05:00
parent f13851f80e
commit 24ee1b773d
3 changed files with 17 additions and 1 deletions

View File

@ -95,9 +95,12 @@ if(!function_exists('zanitlananlar')){
}
if(!function_exists('help_topics')){
function help_topics(){
return HelpTopic::where('active',1)
$topics = HelpTopic::where('active',1)
->select(['id','title_'.config('app.locale').' as title'])
->orderBy('position','asc')
->pluck('title','id');
$topics [] = [0 => 'Other'];
}
}

View File

@ -8,6 +8,7 @@
<div class="col-6">
<form action="{{route('help.create')}}" method="POST">
@csrf
<div class="form-group">
{!! Form::label('name', trans("ClientSide.name"), array('class'=>'control-label')) !!}
{!! Form::text('name', old('name'),array('class'=>'form-control' )) !!}
@ -25,6 +26,10 @@
{!! Form::label('topic', trans("ClientSide.topic"), array('class'=>'control-label')) !!}
{!! Form::select('topic',help_topics(), old('topic'), ['class' => 'form-control','id'=>'topic']) !!}
</div>
<div class="form-group hidden">
{!! Form::label('subject', trans("ClientSide.subject"), array('class'=>'control-label')) !!}
{!! Form::text('subject', old('subject','Other'),array('class'=>'form-control' )) !!}
</div>
<div class="form-group custom-theme">
{!! Form::label('text', trans("ClientSide.text"), array('class'=>'control-label required')) !!}
{!! Form::textarea('text', old('text'),
@ -44,3 +49,7 @@
</div>
</section>
@endsection
@section('after_scripts')
@endsection

View File

@ -9,3 +9,7 @@
</div>
</section>
@endsection
@section('after_scripts')
@endsection