2017 © Pedro Peláez
 

library laravel-absolute-url

A Laravel package to generate absolute URL.

image

sukohi/laravel-absolute-url

A Laravel package to generate absolute URL.

  • Monday, January 30, 2017
  • by Sukohi
  • Repository
  • 1 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

laravel-absolute-url

A Laravel package to generate absolute URL., (*1)

Installation

Execute the following composer command., (*2)

composer require sukohi/laravel-absolute-url:1.*

Register the service provider in app.php, (*3)

'providers' => [
    ...Others...,  
    Sukohi\LaravelAbsoluteUrl\LaravelAbsoluteUrlServiceProvider::class, 
]

Also alias, (*4)

'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., (*5)

Copyright 2016 Sukohi Kuhoh, (*6)

The Versions

30/01 2017

1.0.x-dev

1.0.9999999.9999999-dev

A Laravel package to generate absolute URL.

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi

30/01 2017

dev-master

9999999-dev

A Laravel package to generate absolute URL.

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi

30/01 2017

1.0.1

1.0.1.0

A Laravel package to generate absolute URL.

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi

15/12 2016

1.0.0

1.0.0.0

A Laravel package to generate absolute URL.

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi