app/Http/Controllers/CategoriaController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Models\CategoriaModel  $categoriaModel
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update($id,Request $request)
    {
        $current_timestamp              = date ('Y-m-d H:i:s');
        $categoria                      =CategoriaModel::findOrFail($id);
        $categoria->categoria           = $request['categoria'];
        $categoria->save();
    }
public function update ( $ id , Request $ request ) { $ current_timestamp = date ( 'Y-m-d H:i:s' ) ; $ categoria = CategoriaModel :: findOrFail ( $ id ) ; $ categoria -> categoria = $ request [ 'categoria' ] ; $ categoria -> save ( ) ; }
Update the specified resource in storage.
Update the specified resource in storage .