阅读(242)
赞(4)
Laravel 8 生成基础 URL
2021-06-25 09:31:59 更新
辅助函数 url
可以用于应用的任何一个 URL。生成的 URL 将自动使用当前请求中的方案 (HTTP or HTTPS) 和主机:
$post = AppModelsPost::find(1);
echo url("/posts/{$post->id}");
// http://example.com/posts/1
辅助函数 url
可以用于应用的任何一个 URL。生成的 URL 将自动使用当前请求中的方案 (HTTP or HTTPS) 和主机:
$post = AppModelsPost::find(1);
echo url("/posts/{$post->id}");
// http://example.com/posts/1
Copyright©2023 字节宝| |
违法和不良信息举报电话:|举报邮箱:[email protected]