app/Http/Controllers/ObjetivoController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, Objetivo $objetivo)
    {
        $data=$request->all();
        $objetivo->update($data);
        if ($request->is('api/*')) {
            return $objetivo;
        }
        return redirect()->route('objetivos.index');
    }
public function update ( Request $ request , Objetivo $ objetivo ) { $ data = $ request -> all ( ) ; $ objetivo -> update ( $ data ) ; if ( $ request -> is ( 'api/*' ) ) { return $ objetivo ; } return redirect ( ) -> route ( 'objetivos.index' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .