app/Http/Controllers/UserManagement/PermissionController.php
// Store a newly created resource in storage.
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(Request $request, Permission $permission) {
        $this->validate($request,[
            'title' => 'required|string|min:3|unique:permissions',
        ]);
        $permission->create([
            'title' => $request->title,
        ]);
        Toastr::success('Data Created Successfully', 'Success', ['positionClass' => 'toast-top-right']);
        return redirect()->route('permissions.index');
    }
public function store ( Request $ request , Permission $ permission ) { $ this -> validate ( $ request , [ 'title' => 'required|string|min:3|unique:permissions' , ] ) ; $ permission -> create ( [ 'title' => $ request -> title , ] ) ; Toastr :: success ( 'Data Created Successfully' , 'Success' , [ 'positionClass' => 'toast-top-right' ] ) ; return redirect ( ) -> route ( 'permissions.index' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .
//dd($request->toArray());