src/Http/Controllers/TeamResourceController.php
public function update(TeamRequest $request, Team $team)
    {
        try {
            $attributes = $request->all();

            $team->update($attributes);
            return $this->response->message(trans('messages.success.updated', ['Module' => trans('team::team.name')]))
                ->code(204)
                ->status('success')
                ->url(guard_url('team/team/' . $team->getRouteKey()))
                ->redirect();
        } catch (Exception $e) {
            return $this->response->message($e->getMessage())
                ->code(400)
                ->status('error')
                ->url(guard_url('team/team/' . $team->getRouteKey()))
                ->redirect();
        }

    }
public function update(TeamRequest $request, Team $team)
    {
        try {
            $attributes = $request->all();

            $team->update($attributes);
            return $this->response->message(trans('messages.success.updated', ['Module' => trans('team::team.name')]))
                ->code(204)
                ->status('success')
                ->url(guard_url('team/team/' . $team->getRouteKey()))
                ->redirect();
        } catch (Exception $e) {
            return $this->response->message($e->getMessage())
                ->code(400)
                ->status('error')
                ->url(guard_url('team/team/' . $team->getRouteKey()))
                ->redirect();
        }

    }
public function update ( TeamRequest $ request , Team $ team ) { try { $ attributes = $ request -> all ( ) ; $ team -> update ( $ attributes ) ; return $ this -> response -> message ( trans ( 'messages.success.updated' , [ 'Module' => trans ( 'team::team.name' ) ] ) ) -> code ( 204 ) -> status ( 'success' ) -> url ( guard_url ( 'team/team/' . $ team -> getRouteKey ( ) ) ) -> redirect ( ) ; } catch ( Exception $ e ) { return $ this -> response -> message ( $ e -> getMessage ( ) ) -> code ( 400 ) -> status ( 'error' ) -> url ( guard_url ( 'team/team/' . $ team -> getRouteKey ( ) ) ) -> redirect ( ) ; } }
Update the team.

@param Request $request
@param Model   $team

@return Response
Update the team .