app/Http/Controllers/RoleController.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, Role $role)
    {
        $role->update($request->except(['permissions']));
        $role->permissions()->sync($request->get('permissions'));
        toastr()->success('Rol actualizado con exito!');
        return redirect()->route('roles.index',$role->id);
    }
public function update ( Request $ request , Role $ role ) { $ role -> update ( $ request -> except ( [ 'permissions' ] ) ) ; $ role -> permissions ( ) -> sync ( $ request -> get ( 'permissions' ) ) ; toastr ( ) -> success ( 'Rol actualizado con exito!' ) ; return redirect ( ) -> route ( 'roles.index' , $ role -> id ) ; }
Update the specified resource in storage.
Update the specified resource in storage .