PATH:
home
/
lab2454c
/
.trash
/
core
/
resources
/
views
/
templates
/
basic
/
user
/
collection
@extends('templates.basic.layouts.frontend') @section('content') <section class="dashboard-section pt-60 pb-60"> <div class="container"> <div class="pt-60 pb-60"> <div class="row"> <div class="col-xl-3"> @include('templates.basic.partials.sidebar') </div> <div class="col-xl-9"> <div class="mb-4 d-xl-none text-end"> <div class="sidebar__init"> <i class="las la-columns"></i> </div> </div> <div class="row"> <div> <a href="{{route('user.collection.create')}}" class="btn btn-primary btn-sm mb-3 btn__global" style="float: right;"> <i class="las la-plus"></i> New Collection </a> </div> </div> <div class="row"> @forelse($collections as $collection) <div class="col-sm-12 pb-5"> <div class="card"> <div class="card-body"> <h5 class="card-title text-dark mb-4">{{ isset($collection) ? $collection->name : '-' }}</h5> <div class="row"> @forelse($collection->products as $product) @php $productImage = $product->productImages->first(); //dd($productImage); if (isset($productImage)) { $imageName = explode('.', $productImage->file); $ext = $imageName[count($imageName) - 1]; } @endphp <div class="col-md-4 mr__top"> <div class="card" > @if(isset($productImage)) @if($ext == 'mp4' || $ext == 'mov') <video width="300" height="250" controls> <source src="{{ asset('assets/images/product/'.$productImage->file) }}" type="video/mp4"> Your browser does not support the video tag. </video> @else <a href="{{route('product.detail', $product->id)}}"> <img src="{{ getImage(imagePath()['product']['path'].'/'.$productImage->file,imagePath()['product']['size'])}}" alt="@lang('product')" class="card-img-top"/> </a> @endif @endif <div class="card-body"> <h5 class="card-title">{{isset($product) ? $product->title : '-'}}</h5> </div> </div> </div> @empty <p>No Product Selected in Collection</p> @endforelse </div> <br> <form action="{{route('user.collection.destroy', $collection)}}" method="POST" > @csrf @method('DELETE') <button type="submit" class="btn btn-sm btn-danger btn__global" onclick="return confirm('Are you sure?')"> <i class="las la-trash-alt"></i> @lang('Remove Collection') </button> </form> </div> </div> </div> @empty <h6 class="text-center">No Collection created Yet</h6> @endforelse </div> </div> </div> </div> </div> </section> @endsection
[-] form.blade.php
[edit]
[-] create.blade.php
[edit]
[+]
..
[-] index.blade.php
[edit]