{{-- resources/views/reports/laptop-status.blade.php --}} @extends('layouts.base') @section('content')

Laptop Status Report

Download PDF
{{ $laptops->total() }}
Total Laptops
{{ $laptops->where('status', 'available')->count() }}
Available
{{ $laptops->where('status', 'checked_out')->count() }}
Checked Out
{{ $laptops->whereIn('status', ['maintenance', 'damaged'])->count() }}
Issues
@foreach($laptops->groupBy('class.name') as $className => $classLaptops)

{{ $className }}

@foreach($classLaptops->sortBy('asset_tag') as $laptop) @endforeach
Asset Tag Brand/Model Status Current User Since
{{ $laptop->asset_tag }} {{ $laptop->brand }} {{ $laptop->model }} {{ ucfirst($laptop->status) }} @if($laptop->currentAssignment) {{ $laptop->currentAssignment->student->full_name }} @else - @endif @if($laptop->currentAssignment) {{ $laptop->currentAssignment->checked_out_at->format('M d, Y') }} @else - @endif
@endforeach
{{ $laptops->links() }}

Report generated on {{ now()->format('F d, Y \a\t H:i') }} by {{ auth()->user()->name }}

@endsection