app/Http/Controllers/PermissionController.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, Permission $permission)
    {
        $this->validate($request, [
            'name' => 'required',
        ]);
        $permission = Permission::find($permission->id);
        $permission->name = $request->input('name');
        $permission->save();
        return redirect()->route('permissions')->withStatus(__('Permissions Successfully Updated.'));
    }
public function update ( Request $ request , Permission $ permission ) { $ this -> validate ( $ request , [ 'name' => 'required' , ] ) ; $ permission = Permission :: find ( $ permission -> id ) ; $ permission -> name = $ request -> input ( 'name' ) ; $ permission -> save ( ) ; return redirect ( ) -> route ( 'permissions' ) -> withStatus ( __ ( 'Permissions Successfully Updated.' ) ) ; }
Update the specified resource in storage.
Update the specified resource in storage .