File tree Expand file tree Collapse file tree 4 files changed +23
-8
lines changed Expand file tree Collapse file tree 4 files changed +23
-8
lines changed Original file line number Diff line number Diff line change 27
27
],
28
28
"require" : {
29
29
"box/spout" : " ^3.0" ,
30
- "laravel-enso/core" : " ^9 .0" ,
30
+ "laravel-enso/core" : " ^10 .0" ,
31
31
"laravel-enso/dynamic-methods" : " ^3.0" ,
32
32
"laravel-enso/enums" : " ^2.0" ,
33
33
"laravel-enso/excel" : " ^3.0" ,
51
51
" LaravelEnso\\ DataImport\\ AppServiceProvider" ,
52
52
" LaravelEnso\\ DataImport\\ EnumServiceProvider"
53
53
],
54
- "aliases" : {}
54
+ "aliases" : []
55
55
}
56
56
}
57
57
}
Original file line number Diff line number Diff line change @@ -15,8 +15,6 @@ class Chunk extends Model
15
15
16
16
protected $ guarded = ['id ' ];
17
17
18
- protected $ casts = ['header ' => 'array ' , 'rows ' => 'array ' ];
19
-
20
18
public function import ()
21
19
{
22
20
return $ this ->belongsTo (Import::class);
@@ -43,4 +41,11 @@ public function count(): int
43
41
{
44
42
return count ($ this ->rows );
45
43
}
44
+
45
+ protected function casts (): array
46
+ {
47
+ return [
48
+ 'header ' => 'array ' , 'rows ' => 'array ' ,
49
+ ];
50
+ }
46
51
}
Original file line number Diff line number Diff line change @@ -44,8 +44,6 @@ class Import extends Model implements
44
44
45
45
protected $ guarded = [];
46
46
47
- protected $ casts = ['status ' => 'integer ' , 'params ' => Obj::class];
48
-
49
47
protected $ template ;
50
48
51
49
public function file (): Relation
@@ -309,4 +307,11 @@ public function restart(): void
309
307
310
308
$ this ->import ();
311
309
}
310
+
311
+ protected function casts (): array
312
+ {
313
+ return [
314
+ 'status ' => 'integer ' , 'params ' => Obj::class,
315
+ ];
316
+ }
312
317
}
Original file line number Diff line number Diff line change @@ -13,8 +13,6 @@ class RejectedChunk extends Model
13
13
14
14
protected $ guarded = ['id ' ];
15
15
16
- protected $ casts = ['header ' => 'array ' , 'rows ' => 'array ' ];
17
-
18
16
public function import ()
19
17
{
20
18
return $ this ->belongsTo (Import::class);
@@ -36,4 +34,11 @@ public function empty(): bool
36
34
{
37
35
return count ($ this ->rows ) === 0 ;
38
36
}
37
+
38
+ protected function casts (): array
39
+ {
40
+ return [
41
+ 'header ' => 'array ' , 'rows ' => 'array ' ,
42
+ ];
43
+ }
39
44
}
You can’t perform that action at this time.
0 commit comments