public function update(FeaturesRequest $request, Feature $feature)
    {
        if ($request->has('name') && $feature->name != $request->get('name')) {
            event(new FeatureNameWasUpdated($feature, $request->get('name')));
        }

        $feature->update(
            $request->except('name')
        );

        return redirect()->route('features.edit', $feature)->with('status', trans('globals.success_text'));
    }
public function update(FeaturesRequest $request, Feature $feature)
    {
        if ($request->has('name') && $feature->name != $request->get('name')) {
            event(new FeatureNameWasUpdated($feature, $request->get('name')));
        }

        $feature->update(
            $request->except('name')
        );

        return redirect()->route('features.edit', $feature)->with('status', trans('globals.success_text'));
    }
public function update ( FeaturesRequest $ request , Feature $ feature ) { if ( $ request -> has ( 'name' ) && $ feature -> name != $ request -> get ( 'name' ) ) { event ( new FeatureNameWasUpdated ( $ feature , $ request -> get ( 'name' ) ) ) ; } $ feature -> update ( $ request -> except ( 'name' ) ) ; return redirect ( ) -> route ( 'features.edit' , $ feature ) -> with ( 'status' , trans ( 'globals.success_text' ) ) ; }
Updates the given feature.

@param  FeaturesRequest $request
@param  Feature $feature

@return void
Updates the given feature .