@php $authCheck = auth()->check(); $permission= auth()->user(); @endphp @foreach($subjects as $key => $subject) @endforeach
S.No. Image Name Actions
{{ $key + 1 }} {{--
--}}
@php $iconPath = 'storage/subjects/' . $subject->icon; $iconUrl = (file_exists(public_path($iconPath)) && $subject->icon) ? url($iconPath) : asset('img/no-image.png'); @endphp Subject Icon
{{ $subject->name }}
{{--
--}}
{{ $subjects->links() }}