这是我的代码的一部分:
$form = new Form(new Shop());
$form->tab('terminal', function (Form $form) use ($id) {
$form->hasMany('shopterminal', '', function (Form\NestedForm $form) {
$form->text('terminal_num', 'terminal number')->required();
$form->select('poz_type', 'POS type')->options(['static' => 'one', 'dynamic' => 'two'])->required();
$form->select('psp_id', 'POZ name')->options(Psp::pluck('name', 'id'))->required();
$form->text('sheba', 'sheba number');
$form->text('account_num', 'account number')->required();
$form->select('bank_id', 'bank name')->options(Bank::pluck('name', 'id'))->required();
dd($form);
});
这是结果dd($form)
:
我需要获取terminal_image
item 的值(即15841949062134.png
)。知道我怎么能得到它吗?
请注意,以下语法均无效:
$form->get('terminal_image')
$form->select('terminal_image')
$form->terminal_image
$form()->terminal_image
$form->relation->terminal_image