napp/restful-request

扩展 Illuminate Request 以支持 Laravel 的完整 RESTFul

dev-master 2014-05-20 07:28 UTC

This package is auto-updated.

Last update: 2024-09-05 19:04:30 UTC


README

Laravel 中 \Illuminate\Http\Request 的扩展。

通过使 PUT/PATCH/DELETE 可用,使请求类完全支持 Restful。

安装

您可以通过 Composer 在您的 Laravel 4 项目中安装此包。

在您的 composer.json 中要求此包。

"napp/restful-request": "1.*"

运行 composer 以安装或更新包。

$ composer update

将其添加到 bootstrap/start.php 中的引导中。

use Illuminate\Foundation\Application;
Application::requestClass('Napp\Extensions\Request');

用法

就像平时一样使用它。没有任何变化。

示例

Route::resource('todos', 'TodoController', array('except' => array('create', 'edit')));

作者

Napp ApS
网站: http://www.napp.dk
电子邮件: mm@napp.dk
推特: @nappdev

许可

Copyright (c) 2010-2013 Mads Møller

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.