Download the PHP package sukohi/laravel-absolute-url without Composer
On this page you can find all versions of the php package sukohi/laravel-absolute-url. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download sukohi/laravel-absolute-url
More information about sukohi/laravel-absolute-url
Files in sukohi/laravel-absolute-url
Download sukohi/laravel-absolute-url
More information about sukohi/laravel-absolute-url
Files in sukohi/laravel-absolute-url
Vendor sukohi
Package laravel-absolute-url
Short Description A Laravel package to generate absolute URL.
License MIT
Package laravel-absolute-url
Short Description A Laravel package to generate absolute URL.
License MIT
Please rate this library. Is it a good library?
Informations about the package laravel-absolute-url
laravel-absolute-url
A Laravel package to generate absolute URL.
Installation
Execute the following composer command.
composer require sukohi/laravel-absolute-url:1.*
Register the service provider in app.php
'providers' => [
...Others...,
Sukohi\LaravelAbsoluteUrl\LaravelAbsoluteUrlServiceProvider::class,
]
Also alias
'aliases' => [
...Others...,
'LaravelAbsoluteUrl' => Sukohi\LaravelAbsoluteUrl\Facades\LaravelAbsoluteUrl::class
]
Usage
// 1. Set Base URL
$base_url = 'http://example.com/1/2/3/';
$absolute_path = \LaravelAbsoluteUrl::baseUrl($base_url);
// 2. Get Absolute URL
echo $absolute_path->get('/test.html'); // http://example.com/test.html
echo $absolute_path->get('../test.html'); // http://example.com/1/2/test.html
echo $absolute_path->get('./test.html'); // http://example.com/1/2/3/test.html
echo $absolute_path->get('test.html'); // http://example.com/1/2/3/test.html
License
This package is licensed under the MIT License.
Copyright 2016 Sukohi Kuhoh
All versions of laravel-absolute-url with dependencies
PHP Build Version
Package Version
Requires
laravel/framework Version
~5.0
The package sukohi/laravel-absolute-url contains the following files
Loading the files please wait ....