@php
$filesShowCount = 0; // This is done because if fies uploaded and not have permission to view then no record found message should be shown
@endphp
@forelse($task->files as $file)
@if ($viewTaskFilePermission == 'all' || ($viewTaskFilePermission == 'added' && $file->added_by == user()->id))
@php
$filesShowCount++;
@endphp