app/Http/Controllers/GovernorateController.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, $id)
    {
        $request->validate(
            [
                'name' => 'required'
            ]
        );
        $gov = Governorate::find($id);
        $gov->update($request->all());
        return redirect(route('governorate.index'));
    }
public function update ( Request $ request , $ id ) { $ request -> validate ( [ 'name' => 'required' ] ) ; $ gov = Governorate :: find ( $ id ) ; $ gov -> update ( $ request -> all ( ) ) ; return redirect ( route ( 'governorate.index' ) ) ; }
Update the specified resource in storage.
Update the specified resource in storage .
//$gov->name = $request->name;