# fluentform/6.2.6/app/Http/Controllers/GlobalSettingsController.php

Fluent Forms – Customizable Contact Forms, Survey, Quiz, &amp; Conversational Form Builder, version 6.2.6. 26 lines.

- Page: https://pluginprobe.com/plugins/fluentform/6.2.6/code/app/Http/Controllers/GlobalSettingsController.php
- Raw: https://pluginprobe.com/plugins/fluentform/6.2.6/raw/app/Http/Controllers/GlobalSettingsController.php
- Modified: 2023-06-22T15:10:22+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluentform/6.2.6/code/app/Http/Controllers/GlobalSettingsController.php#L10-L20`.

```php
<?php

namespace FluentForm\App\Http\Controllers;

use FluentForm\Framework\Validator\ValidationException;
use FluentForm\App\Services\GlobalSettings\GlobalSettingsService;

class GlobalSettingsController extends Controller
{
    public function index(GlobalSettingsService $globalSettingsService)
    {
        $result = $globalSettingsService->get($this->request->all());
        return $this->sendSuccess($result);
    }
    
    public function store(GlobalSettingsService $globalSettingsService)
    {
        try {
            $result = $globalSettingsService->store($this->request->all());
            return $this->sendSuccess($result);
        } catch (ValidationException $exception) {
            return $this->sendError($exception->errors(), 422);
        }
    }
}

```
