| 1 |
<?php |
| 2 |
|
| 3 |
namespace FluentForm\App\Http\Controllers; |
| 4 |
|
| 5 |
use Exception; |
| 6 |
use FluentForm\App\Services\Analytics\AnalyticsService; |
| 7 |
use FluentForm\App\Services\Browser\Browser; |
| 8 |
use FluentForm\App\Services\Form\FormService; |
| 9 |
|
| 10 |
class AnalyticsController extends Controller |
| 11 |
{ |
| 12 |
public function reset(AnalyticsService $analyticsService,$formId) |
| 13 |
{ |
| 14 |
try { |
| 15 |
return $this->sendSuccess( |
| 16 |
$analyticsService->reset(intval($formId)) |
| 17 |
); |
| 18 |
} catch (\Exception $e) { |
| 19 |
return $this->sendError([ |
| 20 |
'message' => __('Something went wrong, please try again!', 'fluentform'), |
| 21 |
'error' => $e->getMessage(), |
| 22 |
]); |
| 23 |
} |
| 24 |
} |
| 25 |
} |
| 26 |
|