app/Http/Controllers/UserManagement/PermissionController.php
// Update the specified resource in storage.
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, Permission $permission) {
        $this->validate($request,[
            'title' => 'required|string|min:3|unique:permissions,title,'.$permission->id,
        ]);
        $permission->update([
            'title' => $request->title,
        ]);
        Toastr::success('Data Updated Successfully', 'Success', ['positionClass' => 'toast-top-right']);
         return redirect()->route('permissions.index');
    }
public function update ( Request $ request , Permission $ permission ) { $ this -> validate ( $ request , [ 'title' => 'required|string|min:3|unique:permissions,title,' . $ permission -> id , ] ) ; $ permission -> update ( [ 'title' => $ request -> title , ] ) ; Toastr :: success ( 'Data Updated Successfully' , 'Success' , [ 'positionClass' => 'toast-top-right' ] ) ; return redirect ( ) -> route ( 'permissions.index' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .