Skip to content

Commit

Permalink
Update Proxy.php
Browse files Browse the repository at this point in the history
  • Loading branch information
imanghafoori1 authored Aug 14, 2019
1 parent ad97e9a commit f44df55
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/Proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@ public function __construct($callable, $middlewares)
public function __call($method, $params)
{
$pipeline = new Pipeline(app());

return $pipeline
->via('handle')
->send($params)
->through($this->middlewares)
->then(function ($params) use ($method) {
return call_user_func_array([$this->callable, $method], $params);
});
->then((function ($params) use ($method) {
return ($this->$method(...$params));
})->bindTo($this->callable, $this->callable));
}
}
}

0 comments on commit f44df55

Please sign in to comment.