app/Http/Controllers/ActorController.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(ActorRequest $request, $id)
    {
        try{
            $actor=Actor::updateOrCreate(['idActor'=>$id],$request->all());            
            return redirect('actores')->with('success','Actor actualizado');
        }catch(Exception $e){
            return back()->withErrors(['exception'=>$e->getMessage()])->withInput();
        }
    }
public function update ( ActorRequest $ request , $ id ) { try { $ actor = Actor :: updateOrCreate ( [ 'idActor' => $ id ] , $ request -> all ( ) ) ; return redirect ( 'actores' ) -> with ( 'success' , 'Actor actualizado' ) ; } catch ( Exception $ e ) { return back ( ) -> withErrors ( [ 'exception' => $ e -> getMessage ( ) ] ) -> withInput ( ) ; } }
Update the specified resource in storage.
Update the specified resource in storage .