从文档:// Get the current URL without the query string...echo url()->current();// Get the current URL including the query string...echo url()->full();这些方法中的每一个也可以通过 URL 外观访问:use Illuminate\Support\Facades\URL;echo URL::current();如果您使用命名路由(非强制性):echo route('post.show', ['post' => 1]);// http://example.com/post/1
获取完整、当前和以前的 URL// Get the current URL without the query string...echo url()->current();// Get the current URL including the query string...echo url()->full();// Get the full URL for the previous request...echo url()->previous();获取特定的 URL 段{{ Request::segment(1) }}