app/Http/Controllers/CursosController.php
/**
   * Update the specified resource in storage.
   *
   * @param  \Illuminate\Http\Request  $request
   * @param  \App\Curso  $curso
   * @return \Illuminate\Http\Response
   */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, Curso $curso)
  {
    $this->validator($request);
    $curso->name = $request->name;
    $curso->descricao = $request->descricao;
    $curso->save();
    return redirect()
      ->route('cursos.index')
      ->with('success', 'Curso alterado com sucesso!');
  }
public function update ( Request $ request , Curso $ curso ) { $ this -> validator ( $ request ) ; $ curso -> name = $ request -> name ; $ curso -> descricao = $ request -> descricao ; $ curso -> save ( ) ; return redirect ( ) -> route ( 'cursos.index' ) -> with ( 'success' , 'Curso alterado com sucesso!' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .