@php $addFilePermission = user()->permission('add_project_files'); $viewFilePermission = user()->permission('view_project_files'); $deleteFilePermission = user()->permission('delete_project_files'); @endphp @forelse($files as $file) @if ($viewFilePermission == 'all' || ($viewFilePermission == 'added' && $file->added_by == user()->id)) @if ($viewFilePermission == 'all' || ($viewFilePermission == 'added' && $file->added_by == user()->id)) @if ($file->icon == 'images') @lang('app.view') @else @lang('app.view') @endif @lang('app.download') @endif @if ($deleteFilePermission == 'all' || ($deleteFilePermission == 'added' && $file->added_by == user()->id)) @lang('app.delete') @endif @endif @empty