Skip to content

Commit

Permalink
Merge pull request #1655 from gazben/patch-6
Browse files Browse the repository at this point in the history
Allow https route declaration with 'https' array key and value
  • Loading branch information
specialtactics authored Jun 19, 2019
2 parents 8f97fad + cad2b1a commit 18079c7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Routing/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function __construct(Adapter $adapter, Container $container, Request $req
*/
protected function setupRouteProperties(Request $request, $route)
{
list($this->uri, $this->methods, $this->action) = $this->adapter->getRouteProperties($route, $request);
[$this->uri, $this->methods, $this->action] = $this->adapter->getRouteProperties($route, $request);

$this->versions = Arr::pull($this->action, 'version');
$this->conditionalRequest = Arr::pull($this->action, 'conditionalRequest', true);
Expand Down Expand Up @@ -278,7 +278,7 @@ public function getControllerInstance()
*/
protected function makeControllerInstance()
{
list($this->controllerClass, $this->controllerMethod) = explode('@', $this->action['uses']);
[$this->controllerClass, $this->controllerMethod] = explode('@', $this->action['uses']);

$this->container->instance($this->controllerClass,
$this->controller = $this->container->make($this->controllerClass));
Expand Down Expand Up @@ -511,7 +511,8 @@ public function methods()
*/
public function httpOnly()
{
return in_array('http', $this->action, true);
return in_array('https', $this->action, true)
|| (array_key_exists('https', $this->action) && $this->action['https']);
}

/**
Expand Down

0 comments on commit 18079c7

Please sign in to comment.