noahbass/smart-urls
Composer 安装命令:
composer require noahbass/smart-urls
包简介
Laravel package to use protocol-relative urls.
README 文档
README
Make laravel smarter by producing protocol-relative urls.
Versions
Currently supports Laravel 4. Laravel 5 coming soon.
Installation
Composer require:
composer require noahbass/smart-urls
Or add it to composer.json:
"require": {
"noahbass/smart-urls": "dev-master"
}
URLs
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
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:
'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">...
Todo
- Add the same protocal-relative urls for laravel forms and etc.
- Testing
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-01-10