@extends('layouts.digitar') @section('Breadcrumbs') {!! Breadcrumbs::render('meetings.attachment') !!} @endsection @section('content')
@include('flash::message')

Adicionar Novo Anexo

{!! Form::open([ 'route' => ['meetings.attachament.upload', $meeting->id], 'method' => 'post', 'files' => 'true', 'class' => 'form-horizontal' ]) !!}
{!! Form::text('name', null, ['class' => 'form-control', 'placeholder' => 'Digite o nome do anexo']) !!}
{!! Form::file('file[]', [ 'multiple' => true, 'class' => 'form-control', 'accept' => '.pdf,.doc,.docx,.txt,.jpg,.jpeg,.png', ]) !!}
{!! Form::close() !!}

Lista de Anexos

@foreach ($meeting_files as $file) @php $isPdf = strtolower(pathinfo((string) $file->filename, PATHINFO_EXTENSION)) === 'pdf'; @endphp @endforeach
Nome Ações
{{ $file->name ?? 'Não informado' }} {{ $isPdf ? 'Abrir PDF' : 'Download' }} Excluir
@endsection