@php $authCheck = auth()->check(); $permission= auth()->user(); @endphp @foreach($students as $key => $student) {{-- --}} @endforeach
S.No. User Name Email Parent’s Email DOB Status Actions
{{ $students->firstItem() + $key }}
{{ $student->name }}
{{ $student->email }} {{ $student->parent_email }} {{ \Carbon\Carbon::parse($student->dob)->format('Y-m-d') }} {{ $student->status == 1 ? 'Active' : 'Inactive' }} {{ $student->status == 1 ? 'Active' : 'Inactive' }}
status == 1 ? 'checked' : '' }} >
@if($authCheck && $permission->hasPermission('student-edit')) @endif @if($authCheck && $permission->hasPermission('student-delete')) @endif @if($authCheck && $permission->hasPermission('student-show')) @endif
{{ $students->links() }}