Skip to content

Commit

Permalink
Add getActionMethod to Route.php (#18105)
Browse files Browse the repository at this point in the history
* Update Route.php

* Update Route.php

* Update Route.php
  • Loading branch information
filipeaclima authored and taylorotwell committed Feb 25, 2017
1 parent 9dc25fd commit 8be9acf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Illuminate/Routing/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,16 @@ public function getActionName()
return isset($this->action['controller']) ? $this->action['controller'] : 'Closure';
}

/**
* Get the method name of the route action.
*
* @return string
*/
public function getActionMethod()
{
return array_last(explode('@', $this->getActionName()));
}

/**
* Get the action array for the route.
*
Expand Down

0 comments on commit 8be9acf

Please sign in to comment.