Package Data | |
---|---|
Maintainer Username: | noahbass |
Maintainer Contact: | hello@noahbass.com (Noah Bass) |
Package Create Date: | 2015-01-10 |
Package Last Update: | 2015-01-13 |
Home Page: | https://packagist.org/packages/noahbass/smart-urls |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-24 15:00:13 |
Package Statistics | |
---|---|
Total Downloads: | 8 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Make laravel smarter by producing protocol-relative urls.
Currently supports Laravel 4. Laravel 5 coming soon.
Composer require:
composer require noahbass/smart-urls
Or add it to composer.json
:
"require": {
"noahbass/smart-urls": "dev-master"
}
Noahbass\SmartUrls\SUrl
is available for alias. Use it in app/config/app.php
:
'URL' => 'Noahbass\SmartUrls\SUrl'
URL usage:
{{ URL::to('something') }}
# will produce: //<host>/something
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
:
'Form' => 'Illuminate\Support\Facades\Form',
'SForm' => 'Noahbass\SmartUrls\SForm'
Form usage (SForm
only works for open
, close
, and model
methods):
{{ SForm::open(['url' => 'something']) }}
# will produce: <form method="POST" action="//<host>/something" accept-charset="UTF-8">...