PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 6.0.1
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v6.0.1
6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 3.6.65 3.6.66 All 195 releases
fluentform / app / Http / Controllers / ManagersController.php

ManagersController.php in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder 6.0.1, at app/Http/Controllers/ManagersController.php

36 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentForm\App\Http\Controllers;
4
5 use FluentForm\Framework\Validator\ValidationException;
6 use FluentForm\App\Services\Manager\ManagerService;
7
8 class ManagersController extends Controller
9 {
10 public function index(ManagerService $managerService)
11 {
12 $result = $managerService->getManagers($this->request->all());
13 return $this->sendSuccess($result);
14 }
15
16 public function addManager(ManagerService $managerService)
17 {
18 try {
19 $result = $managerService->addManager($this->request->all());
20 return $this->sendSuccess($result);
21 } catch (ValidationException $exception) {
22 return $this->sendError($exception->errors(), 422);
23 }
24 }
25
26 public function removeManager(ManagerService $managerService)
27 {
28 try {
29 $result = $managerService->removeManager($this->request->all());
30 return $this->sendSuccess($result);
31 } catch (ValidationException $exception) {
32 return $this->sendError($exception->errors(), 422);
33 }
34 }
35 }
36