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


PHP Event::update方法代码示例

本文整理汇总了PHP中app\Event::update方法的典型用法代码示例。如果您正苦于以下问题:PHP Event::update方法的具体用法?PHP Event::update怎么用?PHP Event::update使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在app\Event的用法示例。


在下文中一共展示了Event::update方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: update

 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(Request $request, Studio $studio, Event $event)
 {
     $event->update($this->prepare($request, $studio));
     $event->pieces()->sync($this->prepareTags($request, 'piece_list'));
     $event->categories()->sync($this->prepareTags($request, 'category_list'));
     return redirect()->action('Admin\\StudioEventsController@show', [$studio->id, $event->id]);
 }
开发者ID:evendev,项目名称:crazy-painter,代码行数:14,代码来源:StudioEventsController.php

示例2: update

 /**
  * Update the specified resource in storage.
  *
  * @param  App\Http\Requests\CreateEventRequest
  * @param  \App\Event
  * @return \Illuminate\Http\Response
  */
 public function update(CreateEventRequest $request, Event $event)
 {
     if ($request->ajax()) {
         $title = $request->input('title');
         $location = $request->input('location');
         $date = $request->input('date');
         $date = $date === null ? null : new Carbon($date);
         $event->update(compact('title', 'date', 'location'));
         return;
     }
     return redirect(action('EventsController@index'));
 }
开发者ID:NuLeaf,项目名称:nuleaf-website,代码行数:19,代码来源:EventsController.php

示例3: update

 /**
  * Update the specified resource in storage.
  *
  * @param  Event  $event
  * @param  EventRequest $request
  * @return Response
  */
 public function update(Event $event, EventRequest $request)
 {
     $event->update($request->all());
     \Session::flash('flash_message_event_updated', 'Tu evento ha sido actualizado');
     return redirect('events');
 }
开发者ID:Zizazao,项目名称:evolutizalocal,代码行数:13,代码来源:eventsController.php

示例4: update

 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return Response
  */
 public function update(Requests\CreateEventRequest $request, Event $event)
 {
     $input = $request->all();
     $input['ep'] = $this->_calculateEffortPoints($input);
     $currentMemberIds = $event->getMemberIdsAsArray();
     foreach ($currentMemberIds as $currentMemberId) {
         if (!in_array($currentMemberId, $input['members'])) {
             $event->members()->detach($currentMemberId);
         }
     }
     if (is_array($input['members'])) {
         foreach ($input['members'] as $memberId) {
             if (!in_array($memberId, $currentMemberIds)) {
                 $event->members()->attach($memberId);
             }
         }
     }
     $event->update($input);
     return redirect('events');
 }
开发者ID:yodarian,项目名称:epgp,代码行数:27,代码来源:EventsController.php

示例5: update

 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(Request $request, Event $event)
 {
     $event->update($request->input());
     $event->calendars()->sync($request->input()['calendars']);
     return redirect()->action('EventsController@index');
 }
开发者ID:jimmylorunning,项目名称:librapp,代码行数:13,代码来源:EventsController.php

示例6: update_Paperwork

 /**
  * Update the status of some paperwork.
  * @param \App\Http\Requests\GenericRequest $request
  * @param \App\Event                        $event
  * @return mixed
  */
 private function update_Paperwork(GenericRequest $request, Event $event)
 {
     // Check the event type is event
     if (!$event->isEvent()) {
         return $this->ajaxError('Paperwork is only applicable to events');
     }
     // Check the paperwork type is valid
     $type = $request->get('field');
     if (!isset(Event::$Paperwork[$type])) {
         return $this->ajaxError('Unknown paperwork type: ' . $type);
     }
     // Save
     $event->update(['paperwork' => array_merge($event->paperwork, [$type => $request->get('value') === 'true'])]);
     return Response::json(true);
 }
开发者ID:backstagetechnicalservices,项目名称:website,代码行数:21,代码来源:EventsController.php

示例7: update

 /**
  * Update the specified resource in storage.
  *
  * @param  Request  $request
  * @param  int  $id
  * @return Response
  */
 public function update(EventRequest $request, Studio $studio, Event $event)
 {
     $event->update($this->prepareEventData($request, $studio));
     $this->syncPieces($event, $request->input('piece_list'));
     return redirect()->route('admin.studio.events.show', [$studio->slug, $event->id])->with('message', 'Event updated');
 }
开发者ID:evendev,项目名称:paintstudio,代码行数:13,代码来源:EventsController.php


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