|
|
|
|
27
|
$permissions_string = implode(",", $permissions);
|
27
|
$permissions_string = implode(",", $permissions);
|
28
|
$middleware_string = [];
|
28
|
$middleware_string = [];
|
29
|
foreach (array_merge($this->middleware, $middleware) as $mid) {
|
29
|
foreach (array_merge($this->middleware, $middleware) as $mid) {
|
30
|
- $middleware_string[] = $mid . ":" . $permissions_string;
|
|
|
|
|
30
|
+
|
|
|
31
|
+ $middleware_string[] = $mid . (strpos($mid, ":") !== false ? "," : ":") . $permissions_string;
|
31
|
}
|
32
|
}
|
32
|
return [function() use($business, $method, $permissions)
|
33
|
return [function() use($business, $method, $permissions)
|
33
|
{
|
34
|
{
|