Url
作者:
爱折腾的傻小子 | 来源:发表于
2018-10-29 11:02 被阅读5次
if (! function_exists('url')) {
/**
* Generate a url for the application.
*
* @param string $path # url 路径
* @param mixed $parameters # 参数设置
* @param bool $secure # null = false => http | true => https
* @return \Illuminate\Contracts\Routing\UrlGenerator|string
*/
function url($path = null, $parameters = [], $secure = null)
{
if (is_null($path)) {
return app(UrlGenerator::class);
}
return app(UrlGenerator::class)->to($path, $parameters, $secure);
}
}
# url() 方法使用示例
url(); // 返回一个容器解析的UrlGenerator::class实例
本文标题:Url
本文链接:https://www.haomeiwen.com/subject/tymlvxtx.html
网友评论