@extends('layouts.admin') {{ config('app.name', 'Laravel') }} | Admin | Students @section('main-content')
@if (Session::has('success')) @endif @if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif

Records / Students

Students List
@php use App\Models\SchoolSetting; // Get the current school's bus service status (global for the list) $currentSchoolId = $users->first()->school_id ?? null; // or however you're identifying the school $busServiceEnabled = SchoolSetting::where('school_id', $currentSchoolId)->value('bus_service') ?? 0; @endphp @if ($busServiceEnabled) @endif @if (count($users) != 0) @foreach ($users as $key => $user) @if ($busServiceEnabled) @endif @endforeach @else @endif
S.No First Name Last Name Class Name Parent Email Parent Phone No. StatusSet Location Bus ServiceActions
{{ $key + 1 }} {{ !empty($user->first_name) ? ucwords($user->first_name) : 'N.A.' }} {{ !empty($user->last_name) ? ucwords($user->last_name) : 'N.A.' }} {{ !empty($child_class_arr[$user->uuid]) ? $child_class_arr[$user->uuid] : 'N.A.' }} @if ($user->parent_id !== null) {{ !empty($user->parent->phone) ? $user->parent->phone : 'N.A.' }} @else {{ !empty($user->phone) ? $user->phone : 'N.A.' }} @endif @if ($user->parent_id !== null && $user->parent) @if ($user->parent->status == 'active' && $user->status == 'active')
@else
@endif @else @if ($user->status == 'active')
@else
@endif @endif
{{ 'No record found' }}
@endsection