2017 © Pedro Peláez
 

library smart-urls

Laravel package to use protocol-relative urls.

image

noahbass/smart-urls

Laravel package to use protocol-relative urls.

  • Tuesday, January 13, 2015
  • by noahbass
  • Repository
  • 1 Watchers
  • 1 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Laravel Smart URLs

Build Status Release License, (*1)

Make laravel smarter by producing protocol-relative urls., (*2)

Versions

Currently supports Laravel 4. Laravel 5 coming soon., (*3)

Installation

Composer require:, (*4)

composer require noahbass/smart-urls

Or add it to composer.json:, (*5)

"require": {
    "noahbass/smart-urls": "dev-master"
}

URLs

Noahbass\SmartUrls\SUrl is available for alias. Use it in app/config/app.php:, (*6)

'URL' => 'Noahbass\SmartUrls\SUrl'

URL usage:, (*7)

{{ URL::to('something') }}
# will produce: //<host>/something

Forms

Noahbass\SmartUrls\SForm is available for alias. It must be used in combination with Illuminate\Support\Facades\Form. Use it at your leisure in app/config/app.php:, (*8)

'Form'  => 'Illuminate\Support\Facades\Form',
'SForm' => 'Noahbass\SmartUrls\SForm'

Form usage (SForm only works for open, close, and model methods):, (*9)

{{ SForm::open(['url' => 'something']) }}
# will produce: <form method="POST" action="//<host>/something" accept-charset="UTF-8">...

Todo

  • Add the same protocal-relative urls for laravel forms and etc.
  • Testing

The Versions

13/01 2015

dev-master

9999999-dev

Laravel package to use protocol-relative urls.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Noah Bass

laravel smart urls protocol-relative