Skip to content

Commit 8a95362

Browse files
authored
Merge pull request z-song#5319 from ShuiPingYang/master
Update Table.php
2 parents 027a519 + 3d1f718 commit 8a95362

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

resources/views/partials/toastr.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@if(Session::has('toastr'))
22
@php
3-
$toastr = Session::get('toastr');
3+
$toastr = Session::pull('toastr');
44
$type = \Illuminate\Support\Arr::get($toastr->get('type'), 0, 'success');
55
$message = \Illuminate\Support\Arr::get($toastr->get('message'), 0, '');
66
$options = json_encode($toastr->get('options', []));

src/Form/Field/Table.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ protected function buildRelatedForms()
5656
if (isset($data['pivot'])) {
5757
$data = array_merge($data, $data['pivot']);
5858
}
59-
$forms[$key] = $this->buildNestedForm($this->column, $this->builder, $key)->fill($data);
59+
if (is_array($data)) {
60+
$forms[$key] = $this->buildNestedForm($this->column, $this->builder, $key)->fill($data);
61+
}
6062
}
6163
}
6264

0 commit comments

Comments
 (0)