本文整理汇总了PHP中Events::destroy方法的典型用法代码示例。如果您正苦于以下问题:PHP Events::destroy方法的具体用法?PHP Events::destroy怎么用?PHP Events::destroy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Events
的用法示例。
在下文中一共展示了Events::destroy方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: postDelete
public function postDelete()
{
$ids = Input::get('ids');
foreach ($ids as $id) {
Events::destroy($id);
}
$this->getLoadevents();
}
示例2: getDelete
public function getDelete($id = '')
{
if ($id == '') {
return Redirect::to($this->route)->with('msg_error', Lang::get('messages.events_display_err'));
} else {
$event = Events::find($id);
$delete = Events::destroy($id);
if (!$delete) {
return Redirect::to($this->route . '/trash')->with('msg_error', Lang::get('messages.events_delete_err', array('title' => $event->title)));
} else {
return Redirect::to($this->route . '/trash')->with('msg_success', Lang::get('messages.events_delete', array('title' => $event->title)));
}
}
}
示例3: process_request
protected final function process_request()
{
// Process
//
if ($this->request_noun === REQUEST_NOUN_USERS) {
if ($this->request_verb === 'show') {
// Show
//
if (count($this->inputter->additional_uri_arguments) === 1 && isset($this->inputter->additional_uri_arguments[0]) && $this->http_method === HTTP_METHOD_GET) {
Users::show($this->inputter, $this->outputter);
} else {
$this->invalid_process_additional_argument(count($this->inputter->additional_uri_arguments) - 1);
}
} else {
if ($this->request_verb === 'search' && $this->http_method === HTTP_METHOD_GET) {
// Search
//
Users::search($this->inputter, $this->outputter);
} else {
if ($this->request_verb === 'lookup' && $this->http_method === HTTP_METHOD_GET) {
// Lookup
//
Users::lookup($this->inputter, $this->outputter);
} else {
$this->invalid_process_verb();
}
}
}
} else {
if ($this->request_noun === REQUEST_NOUN_FRIENDS) {
if ($this->request_verb === 'list' && $this->http_method === HTTP_METHOD_GET) {
// List
//
Friends::_list($this->inputter, $this->outputter);
} else {
if ($this->request_verb === 'ids' && $this->http_method === HTTP_METHOD_GET) {
// User IDs
//
Friends::ids($this->inputter, $this->outputter);
} else {
$this->invalid_process_verb();
}
}
} else {
if ($this->request_noun === REQUEST_NOUN_FOLLOWERS) {
if ($this->request_verb === 'list' && $this->http_method === HTTP_METHOD_GET) {
// List
//
Followers::_list($this->inputter, $this->outputter);
} else {
if ($this->request_verb === 'ids' && $this->http_method === HTTP_METHOD_GET) {
// User IDs
//
Followers::ids($this->inputter, $this->outputter);
} else {
$this->invalid_process_verb();
}
}
} else {
if ($this->request_noun === REQUEST_NOUN_IN_PRODUCT_PROMOTIONS) {
if ($this->request_verb === 'show') {
// Show
//
if (count($this->inputter->additional_uri_arguments) === 1 && isset($this->inputter->additional_uri_arguments[0]) && $this->http_method === HTTP_METHOD_GET) {
// In Product Promotion ID
//
InProductPromotions::show($this->inputter, $this->outputter);
} else {
$this->invalid_process_additional_argument(count($this->inputter->additional_uri_arguments) - 1);
}
} else {
if ($this->request_verb === 'create' && $this->http_method === HTTP_METHOD_POST) {
// Create
//
InProductPromotions::create($this->inputter, $this->outputter);
} else {
if ($this->request_verb === 'update' && $this->http_method === HTTP_METHOD_POST) {
// Update
//
InProductPromotions::update($this->inputter, $this->outputter);
} else {
if ($this->request_verb === 'destroy') {
// Destroy
//
if (count($this->inputter->additional_uri_arguments) === 1 && isset($this->inputter->additional_uri_arguments[0]) && $this->http_method === HTTP_METHOD_DELETE) {
// In Product Promotion ID
//
InProductPromotions::destroy($this->inputter, $this->outputter);
} else {
$this->invalid_process_additional_argument(count($this->inputter->additional_uri_arguments) - 1);
}
} else {
$this->invalid_process_verb();
}
}
}
}
} else {
if ($this->request_noun === REQUEST_NOUN_INVITATIONS) {
if ($this->request_verb === 'show') {
//.........这里部分代码省略.........
开发者ID:adamcarter93,项目名称:university-final-year-project-rest-api,代码行数:101,代码来源:EventsRESTController.php
示例4: destroy
/**
* Remove the specified event from storage.
*
* @param int $id
* @return Response
*/
public function destroy($id)
{
Events::destroy($id);
return Redirect::route('events.index');
}