File tree 1 file changed +16
-1
lines changed
1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -82,9 +82,24 @@ protected function parseAllowedScopes($request): void
82
82
$ camel = Helpers::camel ($ scope );
83
83
84
84
if ($ request ->has ($ snake ) || $ request ->has ($ camel )) {
85
- $ value = $ request ->has ($ snake ) ? $ request ->get ($ snake ) : $ request ->get ($ camel );
85
+ $ value = $ this -> parseScopeValue ( $ request ->has ($ snake ) ? $ request ->get ($ snake ) : $ request ->get ($ camel) );
86
86
call_user_func ([$ this ->repository , $ camel ], $ value );
87
87
}
88
88
}
89
89
}
90
+
91
+ /**
92
+ * Parse the value to string / array based in input
93
+ *
94
+ * @param string|array|null $value
95
+ *
96
+ * @return string|array|null
97
+ */
98
+ protected function parseScopeValue ($ value = null )
99
+ {
100
+ if ($ value === null || is_array ($ value ) || strpos ($ value , '|| ' ) === false ){
101
+ return $ value ;
102
+ }
103
+ return explode ("|| " , $ value );
104
+ }
90
105
}
You can’t perform that action at this time.
0 commit comments