Exemplo n.º 1
0
 public function store(\App\Http\Requests\CreatePermissionRequest $request)
 {
     // create the permission
     $this->permission->createPermission($request->all());
     // flash successfull message
     $request->session()->flash('success', 'Successfully create permission. You may add more if you wish.');
     // return back to previous
     return back();
 }
 public function store(CreatePermissionRequest $request)
 {
     $groupType = Permission::create($request->all());
     return redirect()->route('permissions.index')->with('successes', ['Permission created successfully']);
 }
 /**
  * Store a newly created resource in storage.
  *
  * @param  App\Http\Requests\CreatePermissionRequest  $request
  * @return \Illuminate\Http\Response
  */
 public function store(CreatePermissionRequest $request)
 {
     $this->authorize('permissions-create');
     Permission::create($request->all());
     return redirect('permissions');
 }
Exemplo n.º 4
0
 /**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update($id, Requests\CreatePermissionRequest $request)
 {
     //
     $permission = \App\Permission::findOrFail($id);
     $input = $request->all();
     \Session::flash('flash_message', 'permission ' . $permission->name . ' updated.');
     // update
     $permission->update($input);
     return redirect('permissions/' . $permission->id);
 }