%PDF- %PDF-
Direktori : /var/www/html/digiprint/resources/views/dashboard/ |
Current File : /var/www/html/digiprint/resources/views/dashboard/categoriesGallery.blade.php |
@extends('dashboard.layouts.app') @section('content') <div class="container"> <div class="row"> <div class="col-md-12"> <div class="panel panel-default"> <div class="panel-heading"> <h1> <span>{{$category->name}} Gallery</span> <a class="btn btn-success pull-right" href="{{route('dashboard.categories.details', $category->id)}}"> <span>Back</span> </a> </h1> </div> </div> <form class="form-horizontal" method="POST" autocomplete="off" enctype="multipart/form-data" action="{{ route('dashboard.categories.gallery.upload', $category->id) }}"> {{ csrf_field() }} <div class="form-group{{ $errors->has('photos[]') ? ' has-error' : '' }}"> <label for="description" class="col-md-3 control-label">Image</label> <div class="col-md-4"> <input type="file" name="photos[]" id="photos[]" accept="image/*" multiple> @if ($errors->has('photos[]')) <span class="help-block"> <strong>{{ $errors->first('photos[]') }}</strong> </span> @endif </div> <div class="col-md-3"> <button type="submit" class="btn btn-success"> Upload </button> </div> </div> </form> <div class="row gallery-container"> @foreach($category->media()->where('media_type', \Digiprint\Models\Media::MEDIA_TYPE_IMAGE_GALLERY)->get() as $media) <div class="image-container"> <img class="img img-responsive image" src="{{env('APP_URL') . 'uploads/' . $media->file_name}}"> <div class="text-center"> <a class="btn btn-danger" href="{{route('dashboard.categories.gallery.delete', [$category->id, $media->id])}}">Delete</a> </div> </div> @endforeach </div> </div> </div> </div> @endsection