File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 44
55use SplFileObject ;
66use Workflow \Models \StoredWorkflow ;
7+ use Workflow \Serializers \Y ;
78
89class WorkflowsController extends Controller
910{
@@ -33,8 +34,15 @@ public function running() {
3334 public function show ($ id ) {
3435 $ flow = config ('workflows.stored_workflow_model ' , StoredWorkflow::class)::whereId ($ id )->with (['exceptions ' , 'logs ' ])->first ();
3536
37+ $ flow ->arguments = serialize (Y::unserialize ($ flow ->arguments ));
38+
39+ $ flow ->logs = $ flow ->logs ->map (function ($ log ) {
40+ $ log ->result = serialize (Y::unserialize ($ log ->result ));
41+ return $ log ;
42+ });
43+
3644 $ flow ->exceptions = $ flow ->exceptions ->map (function ($ exception ) {
37- $ unserialized = unserialize ($ exception ->exception );
45+ $ unserialized = Y:: unserialize ($ exception ->exception );
3846 if (is_object ($ unserialized ) && method_exists ($ unserialized , 'getFile ' )) {
3947 $ file = new SplFileObject ($ unserialized ->getFile ());
4048 $ file ->seek ($ unserialized ->getLine () - 4 );
@@ -44,10 +52,14 @@ public function show($id) {
4452 if ($ file ->eof ()) break ;
4553 }
4654 $ exception ->code = rtrim ($ exception ->code );
55+ $ unserialized ->trace = $ unserialized ->getTrace ();
4756 }
57+ $ exception ->exception = serialize ($ unserialized );
4858 return $ exception ;
4959 });
5060
61+ $ flow ->output = serialize (Y::unserialize ($ flow ->output ));
62+
5163 return $ flow ;
5264 }
5365}
Original file line number Diff line number Diff line change 1010 ],
1111 "require" : {
1212 "php" : " ^8.0.2" ,
13- "laravel-workflow/laravel-workflow" : " >=0.0.11 " ,
13+ "laravel-workflow/laravel-workflow" : " >=0.0.19 " ,
1414 "illuminate/support" : " ^9.0"
1515 },
1616 "require-dev" : {
You can’t perform that action at this time.
0 commit comments