@php $viewTaskFilePermission = user()->permission('view_task_files'); $deleteTaskFilePermission = user()->permission('delete_task_files'); @endphp @forelse($files as $file) @if ($viewTaskFilePermission == 'all' || ($viewTaskFilePermission == 'added' && $file->added_by == user()->id)) @if ($viewTaskFilePermission == 'all' || ($viewTaskFilePermission == 'added' && $file->added_by == user()->id)) @if ($file->icon == 'images') @lang('app.view') @else @lang('app.view') @endif @lang('app.download') @endif @if ($deleteTaskFilePermission == 'all' || ($deleteTaskFilePermission == 'added' && $file->added_by == user()->id)) @lang('app.delete') @endif @endif @empty