PHP code example of ejunker / laravel-purl
1. Go to this page and download the library: Download ejunker/laravel-purl library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ejunker / laravel-purl example snippets
// Create a \Purl\Url object from a string
$url = Purl::make('http://www.laravel.com');
// Same as Request::url() but as a \Purl\Url object
$url = Purl::requestUrl();
// Same as Request::root() but as a \Purl\Url object
$url = Purl::requestRoot();
// Same as Request::fullUrl() but as a \Purl\Url object
$url = Purl::requestFullUrl();