lundi 26 juin 2017

view images uploaded in DB by clicking view button

I've successfully created a laravel app which can upload and save images. the only challenge i'm facing is how to view an image by clicking the view button. my idea is that when the view button is clicked, an image loads and a user can scroll to the next or previous image with options of either downloading or printing the image. Anyone who can help me achieve this?

this is the form where user can upload and view the uploaded photos

@include('settings.delete_modal')
@extends('layouts.app')
@section('content')
<div>
  <ol class="breadcrumb">
    <li><a href="}"></a></li>
    <li><a href="}"></a></li>
    <li class="active">Photos of 2012 holiday</li>
  </ol>
</div>

<div>
  <caption>
    <div class="secure">Click to select pictures</div>
    {!! Form::open(array('url'=>'vl_twenty_twelve/upload','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('Archive', array('class'=>'btn btn-sm btn-info')) !!}
    {!! Form::close() !!}
  </caption>
</div>
<div>
  <div class="page_content">
    <div class="container-fluid">
      <div class="row">
        <div class="col-sd-10">
          <div class="panel panel-primary">
            <table class="custom-data-table table table-striped dataTable no-footer display nowrap" id="vl2012" data-form="deleteForm">

              <caption>
                <h4 class="pull-left">2012 Pics</h4>

              </caption>
              <thead>
                <tr>
                  <th >#</th>
                  <th >Location ID</th>
                  <th >File Format</th>
                  <th>Actions</th>
                </tr>
              </thead>

              <tbody>
                <?php $row=1; ?>
                @foreach($vluploads as $upload)
                <tr>
                  <th>  </th>
                  <td></td>
                  <td></td>
                  <td>
                    <a  class="btn btn-sm btn-info">
                                    <span class="glyphicon glyphicon-eye-open"> </span>
                                    View
                                </a>
                    <a class="btn btn-sm btn-danger">
                                    <span class="ion-trash-a"></span>
                                    Delete
                                </a>
                    <!--    <a>
                      
                      
                      
                  
                </a>-->
                </td>

</tr>
<?php $row++; ?>
@endforeach
</tbody>
</table>
</div>

</div>
</div>
</div>
</div>
</div>
@endsection



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire