コード例 #1
0
 /**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update(CreateGroupRequest $request, Group $group)
 {
     $group->updated_at = Carbon::now();
     $group->update($request->all());
     Session::flash('flash_message', $group->linkedName() . ' has been updated');
     return redirect('/admin/group');
 }
コード例 #2
0
 /**
  * Update the specified resource in storage.
  *
  * @param  Group  $group
  * @return Response
  */
 public function update(Group $group, Request $request)
 {
     //$this->validate($request, ['name' => 'required']); // Uncomment and modify if you need to validate any input.
     //$group = Group::findOrFail($id);
     $group->update($request->all());
     return redirect('group');
 }
コード例 #3
0
ファイル: GroupController.php プロジェクト: emadmrz/Hawk
 public function adminChange($user = null, Group $group)
 {
     if ($group->active == 0) {
         //the post is already disabled
         $group->update(['active' => 1]);
         Flash::success(trans('admin/messages.groupActivate'));
     } elseif ($group->active == 1) {
         //the post is already enabled
         $group->update(['active' => 0]);
         Flash::success(trans('admin/messages.groupBan'));
     }
     return redirect()->back();
 }