@extends('layouts.app') @section('content')
@include('layouts.left-menu')

View Attendance

Student Name: {{$student->first_name}} {{$student->last_name}}
@foreach ($attendances as $attendance) @endforeach
Status Date Context
@if ($attendance->status == "on") PRESENT @else ABSENT @endif {{$attendance->created_at}} {{($attendance->section == null)?$attendance->course->course_name:$attendance->section->section_name}}
@include('layouts.footer')
@php $events = array(); if(count($attendances) > 0){ foreach ($attendances as $attendance){ if($attendance->status == "on"){ $events[] = ['title'=> "Present", 'start' => $attendance->created_at, 'color'=>'green']; } else { $events[] = ['title'=> "Absent", 'start' => $attendance->created_at, 'color'=>'red']; } } } @endphp @endsection