@extends('layouts.admin.base') @section('page-title') Survey Analytics @endsection @section('content')
@include('admin.settings.layouts.sidebard')

Survey Analytics Dashboard

View and analyze survey responses and user participation data.

@if($surveys->count() > 0)
@foreach($surveys as $survey) @php $totalResponses = \App\Models\UserSurveyAnswer::where('survey_id', $survey->id)->distinct('user_id')->count(); $isActive = \Carbon\Carbon::now()->between($survey->start_at, $survey->end_at); @endphp @endforeach
Survey Name Type Status Start Date End Date Total Responses Actions
{{ $survey->name }} @if($survey->plan)
Incentive Survey @else
Survey Only @endif
@if($survey->plan) Incentive @else Data Collection @endif @if($isActive) Active @else Inactive @endif {{ \Carbon\Carbon::parse($survey->start_at)->format('M d, Y') }} {{ \Carbon\Carbon::parse($survey->end_at)->format('M d, Y') }} {{ $totalResponses }}
@else
No Surveys Found

Create your first survey to start collecting data and analytics.

Create Survey
@endif
@endsection @section('scripts') @endsection