当前位置: 首页>>代码示例>>PHP>>正文


PHP Events::destroy方法代码示例

本文整理汇总了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();
 }
开发者ID:jencko,项目名称:bbk,代码行数:8,代码来源:EventController.php

示例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)));
         }
     }
 }
开发者ID:nagyist,项目名称:abge,代码行数:14,代码来源:EventController.php

示例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');
 }
开发者ID:koenhendriks,项目名称:Gora,代码行数:11,代码来源:EventsController.php


注:本文中的Events::destroy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。