Skip to content

Commit

Permalink
Get the current path formatter.
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Nov 23, 2016
1 parent 368937a commit 4f96f42
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Illuminate/Routing/UrlGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,16 @@ public function formatPathUsing(Closure $callback)
return $this;
}

/**
* Get the path formatter being used by the URL generator.
*
* @return \Closure
*/
public function pathFormatter()
{
return $this->formatPathUsing ?: function ($path) { return $path; };
}

/**
* Get the request instance.
*
Expand Down

0 comments on commit 4f96f42

Please sign in to comment.