Skip to content

Commit 773b644

Browse files
committed
compatiable with laravel 8.0
1 parent 67b2573 commit 773b644

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

resources/views/scaffold.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
@endforeach
9191
</select>
9292
</td>
93-
<td><input type="checkbox" name="fields[{{$index}}][nullable]" {{ array_get($field, 'nullable') == 'on' ? 'checked': '' }}/></td>
93+
<td><input type="checkbox" name="fields[{{$index}}][nullable]" {{ \Illuminate\Support\Arr::get($field, 'nullable') == 'on' ? 'checked': '' }}/></td>
9494
<td>
9595
<select style="width: 150px" name="fields[{{$index}}][key]">
9696
{{--<option value="primary">Primary</option>--}}

src/Scaffold/MigrationCreator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Encore\Admin\Helpers\Scaffold;
44

55
use Illuminate\Database\Migrations\MigrationCreator as BaseMigrationCreator;
6+
use Illuminate\Support\Arr;
67

78
class MigrationCreator extends BaseMigrationCreator
89
{
@@ -93,7 +94,7 @@ public function buildBluePrint($fields = [], $keyName = 'id', $useTimestamps = t
9394
$column .= "->comment('{$field['comment']}')";
9495
}
9596

96-
if (array_get($field, 'nullable') == 'on') {
97+
if (Arr::get($field, 'nullable') == 'on') {
9798
$column .= '->nullable()';
9899
}
99100

0 commit comments

Comments
 (0)