8000 upgrade L11 · laravel-enso/data-import@602e448 · GitHub
[go: up one dir, main page]

Skip to content

Commit 602e448

Browse files
upgrade L11
1 parent 584c3be commit 602e448

File tree

4 files changed

+23
-8
lines changed

4 files changed

+23
-8
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
],
2828
"require": {
2929
"box/spout": "^3.0",
30-
"laravel-enso/core": "^9.0",
30+
"laravel-enso/core": "^10.0",
3131
"laravel-enso/dynamic-methods": "^3.0",
3232
"laravel-enso/enums": "^2.0",
3333
"laravel-enso/excel": "^3.0",
@@ -51,7 +51,7 @@
5151
"LaravelEnso\\DataImport\\AppServiceProvider",
5252
"LaravelEnso\\DataImport\\EnumServiceProvider"
5353
],
54-
"aliases": {}
54+
"aliases": []
5555
}
5656
}
5757
}

src/Models/Chunk.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ class Chunk extends Model
1515

1616
protected $guarded = ['id'];
1717

18-
protected $casts = ['header' => 'array', 'rows' => 'array'];
19-
2018
public function import()
2119
{
2220
return $this->belongsTo(Import::class);
@@ -43,4 +41,11 @@ public function count(): int
4341
{
4442
return count($this->rows);
4543
}
44+
45+
protected function casts(): array
46+
{
47+
return [
48+
'header' => 'array', 'rows' => 'array',
49+
];
50+
}
4651
}

src/Models/Import.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ class Import extends Model implements
4444

4545
protected $guarded = [];
4646

47-
protected $casts = ['status' => 'integer', 'params' => Obj::class];
48-
4947
protected $template;
5048

5149
public function file(): Relation
@@ -309,4 +307,11 @@ public function restart(): void
309307

310308
$this->import();
311309
}
310+
311+
protected function casts(): array
312+
{
313+
return [
314+
'status' => 'integer', 'params' => Obj::class,
315+
];
316+
}
312317
}

src/Models/RejectedChunk.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ class RejectedChunk extends Model
1313

1414
protected $guarded = ['id'];
1515

16-
protected $casts = ['header' => 'array', 'rows' => 'array'];
17-
1816
public function import()
1917
{
2018
return $this->belongsTo(Import::class);
@@ -36,4 +34,11 @@ public function empty(): bool
3634
{
3735
return count($this->rows) === 0;
3836
}
37+
38+
protected function casts(): array
39+
{
40+
return [
41+
'header' => 'array', 'rows' => 'array',
42+
];
43+
}
3944
}

0 commit comments

Comments
 (0)
0