@extends('layouts.layout')

@section('content')


<div class="form-group row add">
  <div class="container">
      @if(Session::has('success'))
        <div class="alert-box success">
          <h2>{!! Session::get('success') !!}</h2>
        </div>
      @endif
      <div class="form-group">
        {!! Form::open(array('url'=>'laporanTransaksiReceptionist/uploadFiles','method'=>'POST', 'files'=>true)) !!}
        {!! Form::file('images[]', array('multiple'=>true)) !!}
          <p>{!!$errors->first('images')!!}</p>
          @if(Session::has('error'))
            <p>{!! Session::get('error') !!}</p>
          @endif
        {!! Form::submit('Submit', array('class'=>'btn btn-lg btn-primary col-md-4')) !!}
        {!! Form::close() !!}
      </div>
    </div>



    <br><br><br>
     
    <table class="table" style="color: black">
    <tr class="success">
    <th>No.</th>
    <th>Original FileName</th>
    <th>Actions</th>
    </tr>

    

    <?php $no=1; ?>

    @foreach($uploadrt as $laporanTransaksiReceptionist)

    <tr style="background-color: #E1E1E1">
    <td>{{$no++}}</td>
    <td>{{$laporanTransaksiReceptionist->original_filename}}</td>
   

    <td>
    <form class="" action="{{route('laporanTransaksiReceptionist.destroy', $laporanTransaksiReceptionist->id)}}" method="post">
    <input class="w3-btn" type="hidden" name="_method" value="delete">
    <input class="w3-btn" type="hidden" name="_token" value="{{ csrf_token() }}">
  

  
  
     
          
            
            <a href="uploadp/{{$laporanTransaksiReceptionist->original_filename}}" download="{{$laporanTransaksiReceptionist->original_filename}}">
              <button type="button" class="btn btn-primary"><i class="fa fa-cloud-download" style="width: 80px;">
                Download
              </i></button> 
            </a>
            
          
          
    
    

    <button type="submit" class="btn btn-danger" onclick="return confirm('Apakah anda yakin untuk menghapus data ini ?');"><i class="fa fa-trash" style="width:50px;"> Delete</i>
    </form>
    </td>

    </tr>

    @endforeach

    </table>
    {!! $uploadrt->links() !!}
   
    </div>



  @endsection