Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.5] Fluent resource options #18767

Merged
merged 8 commits into from
Apr 18, 2017
Prev Previous commit
Next Next commit
fix docblocks, remove unnecessary array checks
  • Loading branch information
jaripekkala committed Apr 11, 2017
commit bc115363d9940f10d58cbca2e65bb83027a620eb
10 changes: 1 addition & 9 deletions src/Illuminate/Routing/PendingResourceRegistration.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,14 @@ public function names(array $names)
}

/**
* Set the methods the controller should exclude.
* Set the route name for controller action.
*
* @param string $method
* @param string $name
* @return \Illuminate\Routing\PendingResourceRegistration
*/
public function name($method, $name)
{
if (! isset($this->options['names'])) {
$this->options['names'] = [];
}

$this->options['names'][$method] = $name;

return $this;
Expand Down Expand Up @@ -147,10 +143,6 @@ public function parameters(array $parameters)
*/
public function parameter($previous, $new)
{
if (! isset($this->options['parameters'])) {
$this->options['parameters'] = [];
}

$this->options['parameters'][$previous] = $new;

return $this;
Expand Down