File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 4
4
5
5
use Illuminate \Http \Request ;
6
6
use Illuminate \Routing \Router ;
7
+ use Illuminate \Support \Collection ;
7
8
use Illuminate \Contracts \Http \Kernel ;
8
9
use Illuminate \Support \Facades \Blade ;
9
10
use Illuminate \Support \Facades \Session ;
@@ -64,13 +65,13 @@ protected function shareValidationErrors()
64
65
return (object ) [];
65
66
}
66
67
67
- return (object ) collect (Session::get ('errors ' )->getBags ())->map (function ($ bag ) {
68
- return collect ($ bag ->messages ())->map (function ($ errors ) {
68
+ return (object ) Collection:: make (Session::get ('errors ' )->getBags ())->map (function ($ bag ) {
69
+ return ( object ) Collection:: make ($ bag ->messages ())->map (function ($ errors ) {
69
70
return $ errors [0 ];
70
- });
71
+ })-> toArray () ;
71
72
})->pipe (function ($ bags ) {
72
- return $ bags ->has ('default ' ) ? $ bags ->get ('default ' ) : $ bags ;
73
- })-> toArray () ;
73
+ return $ bags ->has ('default ' ) ? $ bags ->get ('default ' ) : $ bags-> toArray () ;
74
+ });
74
75
});
75
76
}
76
77
}
You can’t perform that action at this time.
0 commit comments