@extends('layouts.app-admin') @section('content')

Filter Products

to
Reset
@php // Generate dummy data $products = []; $types = ['license', 'physical', 'digital', 'service', 'others']; $licenseTypes = ['full', 'commercial', 'royalty']; for ($i = 1; $i <= 15; $i++) { $type = $types[array_rand($types)]; $licenseType = $type === 'license' ? $licenseTypes[array_rand($licenseTypes)] : null; $products[] = [ 'id' => 'prod-' . str_pad($i, 3, '0', STR_PAD_LEFT), 'number' => 'MSC-' . rand(100, 999) . '-' . rand(1000, 9999), 'name' => 'Product ' . $i . ' ' . ucfirst($type) . ($licenseType ? ' ' . ucfirst($licenseType) : ''), 'description' => 'This is a sample description for product ' . $i, 'type' => $type, 'license_type' => $licenseType, 'price' => rand(5, 500) * 1000, 'picture' => 'https://picsum.photos/id/' . ($i + 10) . '/200/200', 'created_at' => now()->subDays(rand(1, 60))->format('Y-m-d H:i:s'), ]; } @endphp @foreach ($products as $product) @endforeach
Product Number Type License Type Price Created Actions
{{ $product['name'] }}
{{ Str::limit($product['description'], 30) }}
{{ $product['number'] }} {{ ucfirst($product['type']) }} @if ($product['license_type']) {{ ucfirst($product['license_type']) }} @else - @endif Rp {{ number_format($product['price'], 0, ',', '.') }} {{ \Carbon\Carbon::parse($product['created_at'])->format('d M Y') }}
@endsection @push('styles') @endpush @section('scripts') @endsection