Mvc\Url::get

public get ([mixed $uri], [mixed $args], [mixed $local], [mixed $baseUri])

Generates a URL

1
2
3
4
5
6
7
8
9
10
11
//Generate a URL appending the URI to the base URI
 echo $url->get('products/edit/1');
 
 //Generate a URL for a predefined route
 echo $url->get(array('for' => 'blog-post', 'title' => 'some-cool-stuff', 'year' => '2015'));
 
 // Generate a URL with GET arguments (/show/products?id=1&name=Carrots)
 echo $url->get('show/products', array('id' => 1, 'name' => 'Carrots'));
 
 // Generate an absolute URL by setting the third parameter as false.
 echo $url->get('https://phalconphp.com/', null, false);
doc_Phalcon
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.