24 lines
500 B
PHP
24 lines
500 B
PHP
<?php
|
|
|
|
namespace App\Admin\Actions\Grid;
|
|
|
|
use Dcat\Admin\Grid\RowAction;
|
|
use App\Admin\Forms\GuessAnswer as GuessAnswerForm;
|
|
use Dcat\Admin\Widgets\Modal;
|
|
|
|
class GuessAnswer extends RowAction
|
|
{
|
|
protected $title = '公布答案';
|
|
|
|
public function render()
|
|
{
|
|
$form = GuessAnswerForm::make()->payload(['id' => $this->getKey()]);
|
|
|
|
return Modal::make()
|
|
->lg()
|
|
->title($this->row->name)
|
|
->body($form)
|
|
->button($this->title);
|
|
}
|
|
}
|