@extends('admin.layouts.master') @section('content')
{!! Form::open(array('route' => \App\Helpers\Helper::adminPrefix(). '.store', 'name' => 'user-form', 'id' => 'user-form', 'autocomplete' => 'off')) !!}

{{ __('Create') }} {{ \App\Helpers\Helper::pagePrefix(2) }}

{!! Form::label('title', 'Title :', ['class' => 'control-label']) !!} {!! Form::textarea('title', old('title'), ['class' => $errors->has('title') ? 'form-control is-invalid' : 'form-control', 'id' => 'title', 'placeholder' => 'Question', 'rows' => 8]) !!} @if ($errors->has('title')) {{ $errors->first('title') }} @endif
{!! Form::label('status', 'Active :', ['class' => 'control-label']) !!}
{!! Form::radio('status', '1', old('status', true), ['id' => 'statuson']) !!} {!! Form::label('statuson', 'Yes') !!}
{!! Form::radio('status', '0', old('status', false), ['id' => 'statusoff']) !!} {!! Form::label('statusoff', 'No') !!}
{!! Form::label('point', 'Point :', ['class' => 'control-label']) !!} {!! Form::number('point', old('point', 10), ['class' => $errors->has('point') ? 'form-control is-invalid' : 'form-control', 'id' => 'point']) !!} @if ($errors->has('point')) {{ $errors->first('point') }} @endif
@if ($errors->has('correct'))
{{ $errors->first('correct') }}
@endif
@for($i = 1; $i < 5; $i++)
{!! Form::label('choice['.$i.']', 'Choice'.$i.' :', ['class' => 'control-label']) !!} {!! Form::text('choice['.$i.']', old('choice['.$i.']'), ['class' => $errors->has('choice.'.$i) ? 'form-control is-invalid' : 'form-control', 'id' => 'choice'.$i, 'placeholder' => 'Choice '.$i]) !!} @if ($errors->has('choice.'.$i)) {{ $errors->first('choice.'.$i) }} @endif
{!! Form::label('correct['.$i.']', 'Correct :', ['class' => 'control-label']) !!}
{!! Form::radio('correct['.$i.']', '1', false, ['id' => 'correct'.$i.'on', '']) !!} {!! Form::label('correct'.$i.'on', 'Yes') !!}
@endfor
{!! Form::close() !!}
@endsection @section('script') @endsection