File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 6
6
use Illuminate \Collections \Arr ;
7
7
use Illuminate \Collections \Collection ;
8
8
use Illuminate \Contracts \Queue \Factory as QueueFactory ;
9
+ use Illuminate \Contracts \Support \Arrayable ;
9
10
use JsonSerializable ;
10
11
11
- class Batch implements JsonSerializable
12
+ class Batch implements Arrayable, JsonSerializable
12
13
{
13
14
/**
14
15
* The queue factory implementation.
@@ -361,11 +362,11 @@ public function delete()
361
362
}
362
363
363
364
/**
364
- * Get the JSON serializable representation of the object .
365
+ * Convert the batch to an array .
365
366
*
366
367
* @return array
367
368
*/
368
- public function jsonSerialize ()
369
+ public function toArray ()
369
370
{
370
371
return [
371
372
'id ' => $ this ->id ,
@@ -379,4 +380,14 @@ public function jsonSerialize()
379
380
'finishedAt ' => $ this ->finishedAt ,
380
381
];
381
382
}
383
+
384
+ /**
385
+ * Get the JSON serializable representation of the object.
386
+ *
387
+ * @return array
388
+ */
389
+ public function jsonSerialize ()
390
+ {
391
+ return $ this ->toArray ();
392
+ }
382
393
}
You can’t perform that action at this time.
0 commit comments