@@ -79,22 +79,22 @@ discard block |
||
| 79 | 79 | */ |
| 80 | 80 | protected function grid() |
| 81 | 81 | { |
| 82 | - $grid = new Grid(new ProblemModel); |
|
| 83 | - $grid->column('pid',"ID")->sortable(); |
|
| 84 | - $grid->column('pcode',"PCode")->editable(); |
|
| 82 | + $grid=new Grid(new ProblemModel); |
|
| 83 | + $grid->column('pid', "ID")->sortable(); |
|
| 84 | + $grid->column('pcode', "PCode")->editable(); |
|
| 85 | 85 | $grid->title("Title")->editable(); |
| 86 | 86 | $grid->time_limit("Time/ms")->editable(); |
| 87 | 87 | $grid->memory_limit("Memory/kb")->editable(); |
| 88 | 88 | $grid->OJ(); |
| 89 | 89 | $grid->update_date(); |
| 90 | 90 | $grid->tot_score("Score"); |
| 91 | - $grid->partial("Partial")->display(function ($partial) { |
|
| 91 | + $grid->partial("Partial")->display(function($partial) { |
|
| 92 | 92 | return $partial ? '是' : '否'; |
| 93 | 93 | }); |
| 94 | - $grid->markdown("Markdown")->display(function ($markdown) { |
|
| 94 | + $grid->markdown("Markdown")->display(function($markdown) { |
|
| 95 | 95 | return $markdown ? '是' : '否'; |
| 96 | 96 | }); |
| 97 | - $grid->filter(function (Grid\Filter $filter) { |
|
| 97 | + $grid->filter(function(Grid\Filter $filter) { |
|
| 98 | 98 | $filter->disableIdFilter(); |
| 99 | 99 | $filter->like('pcode'); |
| 100 | 100 | $filter->like('title'); |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | */ |
| 111 | 111 | protected function detail($id) |
| 112 | 112 | { |
| 113 | - $show = new Show(ProblemModel::findOrFail($id)); |
|
| 113 | + $show=new Show(ProblemModel::findOrFail($id)); |
|
| 114 | 114 | return $show; |
| 115 | 115 | } |
| 116 | 116 | |
@@ -121,9 +121,9 @@ discard block |
||
| 121 | 121 | */ |
| 122 | 122 | protected function form() |
| 123 | 123 | { |
| 124 | - $form = new Form(new ProblemModel); |
|
| 124 | + $form=new Form(new ProblemModel); |
|
| 125 | 125 | $form->model()->makeVisible('password'); |
| 126 | - $form->tab('Basic', function (Form $form) { |
|
| 126 | + $form->tab('Basic', function(Form $form) { |
|
| 127 | 127 | // $form->display('pid'); |
| 128 | 128 | // $form->text('pcode')->rules('required'); |
| 129 | 129 | $form->text('title')->rules('required'); |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | class ProblemModel extends Model |
| 10 | 10 | { |
| 11 | 11 | protected $table='problem'; |
| 12 | - protected $primaryKey = 'pid'; |
|
| 12 | + protected $primaryKey='pid'; |
|
| 13 | 13 | |
| 14 | 14 | public function detail($pcode, $cid=null) |
| 15 | 15 | { |