當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。