use Illuminate\Http\Request; $request = Request::capture(); $root = $request->root(); echo $root;
use Illuminate\Http\Request; $request = Request::capture(); $root = $request->root('https'); echo $root;In this example, we pass the `https` scheme as an argument to the `root()` method. This will return the URL root with the `https` scheme, instead of the default `http` scheme. In conclusion, the PHP Illuminate\Http\Request root method is a useful feature for retrieving the URL root of the current request. The package library for this class is the `Illuminate\Http` package in Laravel framework.