Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

route

     * Get the URL to a named route.     *     * @param  string  $name     * @param  mixed  $parameters     * @param  bool  $absolute     * @return string     *     * @throws SymfonyComponentRoutingExceptionRouteNotFoundException     */    public function route($name, $parameters = [], $absolute = true)    {        if (! is_null($route = $this->routes->getByName($name))) {            return $this->toRoute($route, $parameters, $absolute);        }         throw new RouteNotFoundException("Route [{$name}] not defined.");    }     /**     * Get the URL for a given route instance.     *     * @param  IlluminateRoutingRoute  $route     * @param  mixed  $parameters     * @param  bool  $absolute     * @return string     *     * @throws IlluminateRoutingExceptionsUrlGenerationException     */    public function toRoute($route, $parameters, $absolute)    {        $parameters = collect(Arr::wrap($parameters))->map(function ($value, $key) use ($route) {
            
 
PREVIOUS NEXT
Tagged: #route
ADD COMMENT
Topic
Name
1+1 =