:::

4-4 /resources/views/exam/form.blade.php

@if(isset($topic))
    {{ bs()->openForm('patch', "/topic/{$topic->id}", ['model' => $topic]) }}
@else
    {{ bs()->openForm('post', '/topic') }}
@endif

    {{ bs()->formGroup()
            ->label('題目內容', false, 'text-sm-right')
            ->control(bs()->textarea('topic')->placeholder('請輸入題目內容'))
            ->showAsRow() }}
    {{ bs()->formGroup()
            ->label('選項1', false, 'text-sm-right')
            ->control(bs()->text('opt1')->placeholder('輸入選項1'))
            ->showAsRow() }}
    {{ bs()->formGroup()
            ->label('選項2', false, 'text-sm-right')
            ->control(bs()->text('opt2')->placeholder('輸入選項2'))
            ->showAsRow() }}
    {{ bs()->formGroup()
            ->label('選項3', false, 'text-sm-right')
            ->control(bs()->text('opt3')->placeholder('輸入選項3'))
            ->showAsRow() }}
    {{ bs()->formGroup()
            ->label('選項4', false, 'text-sm-right')
            ->control(bs()->text('opt4')->placeholder('輸入選項4'))
            ->showAsRow() }}

    {{ bs()->formGroup()
        ->label('正確解答', false, 'text-sm-right')
        ->control(bs()->radioGroup('ans', [1=>'1', 2=>'2', 3=>'3', 4=>'4'])
                ->inline()
                ->addRadioClass(['my-1','mx-3']))
        ->showAsRow() }}

    {{-- {{ bs()->formGroup()
            ->label('正確解答', false, 'text-sm-right')
            ->control(bs()->select('ans',[1=>1, 2=>2, 3=>3, 4=>4])->placeholder('請設定正確解答'))
            ->showAsRow() }} --}}

    {{ bs()->hidden('exam_id', $exam->id) }}
    {{ bs()->formGroup()
            ->label('')
            ->control(bs()->submit('儲存'))
            ->showAsRow() }}
{{ bs()->closeForm() }}

 


:::

書籍目錄

展開 | 闔起

快速登入


http%3A%2F%2Fcampus-xoops.tn.edu.tw%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbdsn%3D1324%26tbsn%3D41

計數器

今天: 943943943
昨天: 4125412541254125
總計: 8043721804372180437218043721804372180437218043721