feat: complete admin CMS for customizable layout, texts, products, categories and orders

This commit is contained in:
2026-10-31 21:18:01 +01:00
parent 957661a186
commit f8c002366b
21 changed files with 2076 additions and 76 deletions
@@ -0,0 +1,48 @@
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Models\Category;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\View\View;
class CategoryController extends Controller
{
/**
* Display a listing of categories.
*/
public function index(): View
{
$categories = Category::withCount('products')->get();
return view('admin.categories.index', compact('categories'));
}
/**
* Show the form for editing the category.
*/
public function edit(Category $category): View
{
return view('admin.categories.edit', compact('category'));
}
/**
* Update the category in storage.
*/
public function update(Request $request, Category $category): RedirectResponse
{
$validated = $request->validate([
'name' => 'required|string|max:255',
'description' => 'nullable|string',
'icon' => 'nullable|string|max:50',
'sort_order' => 'nullable|integer',
]);
$category->update($validated);
return redirect()->route('admin.categories.index')
->with('success', "Categorie '{$category->name}' is succesvol bijgewerkt!");
}
}
@@ -0,0 +1,135 @@
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Models\Setting;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\View\View;
class ContentController extends Controller
{
/**
* Display the layout and texts editor.
*/
public function index(): View
{
return view('admin.content.index');
}
/**
* Save updated settings and layout options.
*/
public function update(Request $request): RedirectResponse
{
$fields = [
// Brand & Theme
'site_name',
'site_tagline',
'meta_description',
'theme_palette',
// Announcement
'announcement_enabled',
'announcement_text',
'announcement_badge_1',
'announcement_badge_2',
// Hero
'hero_badge',
'hero_title',
'hero_subtitle',
'hero_primary_btn_text',
'hero_primary_btn_url',
'hero_secondary_btn_text',
'hero_secondary_btn_url',
'hero_stat_1_val',
'hero_stat_1_lbl',
'hero_stat_2_val',
'hero_stat_2_lbl',
'hero_stat_3_val',
'hero_stat_3_lbl',
'hero_card_badge',
// Categories Section
'categories_tag',
'categories_title',
'categories_subtitle',
// Featured Products Section
'featured_tag',
'featured_title',
'featured_subtitle',
// USP / Quality Section
'usp_tag',
'usp_title',
'usp_subtitle',
'usp_1_title',
'usp_1_desc',
'usp_2_title',
'usp_2_desc',
'usp_3_title',
'usp_3_desc',
'usp_4_title',
'usp_4_desc',
'usp_btn_text',
// Footer
'footer_description',
'footer_status_text',
'footer_email',
'footer_shipping_text',
'footer_copyright',
'footer_payment_text',
];
// Handle checkbox toggles that aren't present if unchecked
if (! $request->has('announcement_enabled')) {
Setting::set('announcement_enabled', '0');
}
foreach ($fields as $field) {
if ($request->has($field)) {
$value = $request->input($field);
Setting::set($field, is_string($value) ? trim($value) : $value);
}
}
Setting::flushCache();
return redirect()->route('admin.content.index')
->with('success', 'Layout en teksten zijn direct opgeslagen en live bijgewerkt in de webshop!');
}
/**
* Reset specific settings or all back to default.
*/
public function reset(): RedirectResponse
{
$keys = [
'site_name', 'site_tagline', 'meta_description', 'theme_palette',
'announcement_enabled', 'announcement_text', 'announcement_badge_1', 'announcement_badge_2',
'hero_badge', 'hero_title', 'hero_subtitle', 'hero_primary_btn_text', 'hero_primary_btn_url',
'hero_secondary_btn_text', 'hero_secondary_btn_url',
'hero_stat_1_val', 'hero_stat_1_lbl', 'hero_stat_2_val', 'hero_stat_2_lbl', 'hero_stat_3_val', 'hero_stat_3_lbl',
'hero_card_badge',
'categories_tag', 'categories_title', 'categories_subtitle',
'featured_tag', 'featured_title', 'featured_subtitle',
'usp_tag', 'usp_title', 'usp_subtitle',
'usp_1_title', 'usp_1_desc', 'usp_2_title', 'usp_2_desc', 'usp_3_title', 'usp_3_desc', 'usp_4_title', 'usp_4_desc',
'usp_btn_text',
'footer_description', 'footer_status_text', 'footer_email', 'footer_shipping_text', 'footer_copyright', 'footer_payment_text',
];
foreach ($keys as $key) {
Setting::forget($key);
}
Setting::flushCache();
return redirect()->route('admin.content.index')
->with('success', 'Alle teksten en lay-out instellingen zijn hersteld naar de standaarden.');
}
}
@@ -0,0 +1,53 @@
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Models\Order;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\View\View;
class OrderController extends Controller
{
/**
* Display a listing of orders.
*/
public function index(Request $request): View
{
$query = Order::with('items')->latest();
if ($request->filled('status')) {
$query->where('status', $request->input('status'));
}
$orders = $query->paginate(20)->withQueryString();
return view('admin.orders.index', compact('orders'));
}
/**
* Display order details.
*/
public function show(Order $order): View
{
$order->load('items.product');
return view('admin.orders.show', compact('order'));
}
/**
* Update order status.
*/
public function updateStatus(Request $request, Order $order): RedirectResponse
{
$validated = $request->validate([
'status' => 'required|string|in:pending,processing,printed,shipped,completed,cancelled',
]);
$order->update(['status' => $validated['status']]);
return redirect()->route('admin.orders.show', $order)
->with('success', "Bestelling #{$order->order_number} status is gewijzigd naar '{$validated['status']}'!");
}
}
@@ -0,0 +1,134 @@
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Models\Category;
use App\Models\Product;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Str;
use Illuminate\View\View;
class ProductController extends Controller
{
/**
* Display a listing of products.
*/
public function index(Request $request): View
{
$query = Product::with('category')->latest();
if ($request->filled('q')) {
$q = $request->input('q');
$query->where(function ($w) use ($q) {
$w->where('name', 'like', "%{$q}%")
->orWhere('description', 'like', "%{$q}%");
});
}
if ($request->filled('category_id')) {
$query->where('category_id', $request->input('category_id'));
}
$products = $query->paginate(20)->withQueryString();
$categories = Category::all();
return view('admin.products.index', compact('products', 'categories'));
}
/**
* Show the form for creating a new product.
*/
public function create(): View
{
$categories = Category::all();
return view('admin.products.create', compact('categories'));
}
/**
* Store a newly created product in storage.
*/
public function store(Request $request): RedirectResponse
{
$validated = $request->validate([
'name' => 'required|string|max:255',
'category_id' => 'required|exists:categories,id',
'base_price' => 'required|numeric|min:0.01',
'short_description' => 'nullable|string|max:500',
'description' => 'required|string',
'image_url' => 'nullable|string|max:500',
'dimensions' => 'nullable|string|max:100',
'weight_grams' => 'nullable|integer|min:0',
'print_time_hours' => 'nullable|numeric|min:0',
'is_featured' => 'nullable|boolean',
'is_active' => 'nullable|boolean',
]);
$validated['slug'] = Str::slug($validated['name']);
$validated['is_featured'] = $request->boolean('is_featured');
$validated['is_active'] = $request->boolean('is_active');
$validated['available_materials'] = ['pla', 'petg', 'silk', 'tpu'];
$validated['available_colors'] = [
'Zon Geel (Pikachu)', 'Vurig Rood (Charizard)', 'Hemelsblauw (Squirtle)',
'Muntgroen (Bulbasaur)', 'Spooky Paars (Gengar)', 'Koper Zijdeglans',
'Regenboog Multi-Color', 'Mat Zwart', 'Sneeuwwit',
];
Product::create($validated);
return redirect()->route('admin.products.index')
->with('success', "Product '{$validated['name']}' is succesvol aangemaakt!");
}
/**
* Show the form for editing the specified product.
*/
public function edit(Product $product): View
{
$categories = Category::all();
return view('admin.products.edit', compact('product', 'categories'));
}
/**
* Update the specified product in storage.
*/
public function update(Request $request, Product $product): RedirectResponse
{
$validated = $request->validate([
'name' => 'required|string|max:255',
'category_id' => 'required|exists:categories,id',
'base_price' => 'required|numeric|min:0.01',
'short_description' => 'nullable|string|max:500',
'description' => 'required|string',
'image_url' => 'nullable|string|max:500',
'dimensions' => 'nullable|string|max:100',
'weight_grams' => 'nullable|integer|min:0',
'print_time_hours' => 'nullable|numeric|min:0',
'is_featured' => 'nullable|boolean',
'is_active' => 'nullable|boolean',
]);
$validated['is_featured'] = $request->boolean('is_featured');
$validated['is_active'] = $request->boolean('is_active');
$product->update($validated);
return redirect()->route('admin.products.index')
->with('success', "Product '{$product->name}' is succesvol bijgewerkt!");
}
/**
* Remove the specified product from storage.
*/
public function destroy(Product $product): RedirectResponse
{
$name = $product->name;
$product->delete();
return redirect()->route('admin.products.index')
->with('success', "Product '{$name}' is verwijderd.");
}
}
+36 -4
View File
@@ -3,6 +3,7 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Throwable;
class Setting extends Model
{
@@ -17,23 +18,50 @@ class Setting extends Model
'value',
];
/**
* @var array<string, mixed>|null
*/
protected static ?array $runtimeCache = null;
public static function flushCache(): void
{
static::$runtimeCache = null;
}
public static function get(string $key, mixed $default = null): mixed
{
$setting = static::query()->find($key);
if (static::$runtimeCache === null) {
try {
static::$runtimeCache = static::query()->pluck('value', 'key')->all();
} catch (Throwable) {
return $default;
}
}
if (! $setting || $setting->value === null) {
if (! array_key_exists($key, static::$runtimeCache) || static::$runtimeCache[$key] === null) {
return $default;
}
$decoded = json_decode($setting->value, true);
$val = static::$runtimeCache[$key];
return (json_last_error() === JSON_ERROR_NONE) ? $decoded : $setting->value;
if (is_string($val) && (str_starts_with($val, '{') || str_starts_with($val, '['))) {
$decoded = json_decode($val, true);
if (json_last_error() === JSON_ERROR_NONE) {
return $decoded;
}
}
return $val;
}
public static function set(string $key, mixed $value): static
{
$encoded = is_array($value) || is_object($value) ? json_encode($value) : (string) $value;
if (static::$runtimeCache !== null) {
static::$runtimeCache[$key] = $encoded;
}
return static::query()->updateOrCreate(
['key' => $key],
['value' => $encoded]
@@ -42,6 +70,10 @@ class Setting extends Model
public static function forget(string $key): bool
{
if (static::$runtimeCache !== null) {
unset(static::$runtimeCache[$key]);
}
return (bool) static::query()->where('key', $key)->delete();
}
}
+2
View File
@@ -20,6 +20,8 @@ class AppServiceProvider extends ServiceProvider
*/
public function boot(): void
{
require_once app_path('helpers.php');
if (app()->environment('production') || str_starts_with(config('app.url', ''), 'https://')) {
URL::forceScheme('https');
}
+10
View File
@@ -0,0 +1,10 @@
<?php
use App\Models\Setting;
if (! function_exists('setting')) {
function setting(string $key, mixed $default = null): mixed
{
return Setting::get($key, $default);
}
}
@@ -0,0 +1,62 @@
@extends('layouts.admin')
@section('title', 'Categorie Bewerken: ' . $category->name . ' | Jouwdriedee Beheer')
@section('content')
<div class="space-y-6 max-w-xl mx-auto">
<!-- Header -->
<div class="flex items-center justify-between pb-6 border-b border-slate-800">
<div>
<a href="{{ route('admin.categories.index') }}" class="text-xs text-amber-400 font-bold hover:underline inline-flex items-center space-x-1 mb-1">
<i data-lucide="arrow-left" class="w-3.5 h-3.5"></i>
<span>Terug naar Categorieën</span>
</a>
<h1 class="font-heading text-2xl font-black text-white">Categorie Bewerken: {{ $category->name }}</h1>
</div>
</div>
<!-- Edit Form -->
<form action="{{ route('admin.categories.update', $category) }}" method="POST" class="space-y-6">
@csrf
@method('PUT')
<div class="p-6 rounded-3xl bg-slate-900 border border-slate-800 space-y-4">
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Categorienaam *</label>
<input type="text" name="name" value="{{ old('name', $category->name) }}" required class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2.5 text-xs text-white font-bold focus:outline-none focus:ring-2 focus:ring-amber-400">
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Omschrijving</label>
<textarea name="description" rows="3" class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2 text-xs text-white leading-relaxed">{{ old('description', $category->description) }}</textarea>
</div>
<div class="grid grid-cols-2 gap-4">
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Lucide Icoon</label>
<input type="text" name="icon" value="{{ old('icon', $category->icon) }}" placeholder="sparkles, zap, film..." class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3 py-2 text-xs text-white">
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Volgorde</label>
<input type="number" name="sort_order" value="{{ old('sort_order', $category->sort_order) }}" class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3 py-2 text-xs text-white">
</div>
</div>
</div>
<div class="flex items-center justify-end space-x-3">
<a href="{{ route('admin.categories.index') }}" class="px-4 py-2.5 rounded-xl bg-slate-800 text-slate-300 hover:text-white text-xs font-bold transition">
Annuleren
</a>
<button type="submit" class="px-6 py-2.5 rounded-xl bg-amber-400 hover:bg-amber-300 text-slate-950 font-black text-xs transition flex items-center space-x-1.5">
<i data-lucide="save" class="w-4 h-4"></i>
<span>Opslaan</span>
</button>
</div>
</form>
</div>
@endsection
@@ -0,0 +1,53 @@
@extends('layouts.admin')
@section('title', 'Categorieën Beheren | Jouwdriedee Beheer')
@section('content')
<div class="space-y-6">
<!-- Header -->
<div class="flex items-center justify-between pb-6 border-b border-slate-800">
<div>
<div class="inline-flex items-center space-x-2 text-xs text-amber-400 font-bold uppercase tracking-wider mb-1">
<i data-lucide="folder-tree" class="w-4 h-4"></i>
<span>Winkelstructuur</span>
</div>
<h1 class="font-heading text-2xl sm:text-3xl font-black text-white">Categorieën Beheer</h1>
<p class="text-xs sm:text-sm text-slate-400 mt-1">Beheer categorie titels, omschrijvingen en sortering.</p>
</div>
</div>
<!-- Categories Grid -->
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
@foreach($categories as $category)
<div class="p-6 rounded-3xl bg-slate-900 border border-slate-800 flex flex-col justify-between space-y-4">
<div class="space-y-3">
<div class="flex items-center justify-between">
<span class="px-2.5 py-1 rounded-lg bg-amber-400/20 text-amber-400 font-mono text-xs font-black">
/catalogus?category={{ $category->slug }}
</span>
<span class="text-xs text-slate-400 font-bold">
{{ $category->products_count }} producten
</span>
</div>
<h3 class="font-heading text-lg font-black text-white">{{ $category->name }}</h3>
<p class="text-xs text-slate-400 leading-relaxed font-normal">{{ $category->description }}</p>
</div>
<div class="pt-4 border-t border-slate-800 flex items-center justify-between">
<a href="{{ route('catalog', ['category' => $category->slug]) }}" target="_blank" class="text-xs text-slate-400 hover:text-white flex items-center space-x-1">
<span>Bekijk in shop</span>
<i data-lucide="external-link" class="w-3 h-3"></i>
</a>
<a href="{{ route('admin.categories.edit', $category) }}" class="px-3.5 py-1.5 rounded-xl bg-slate-800 hover:bg-amber-400 text-slate-200 hover:text-slate-950 text-xs font-bold transition flex items-center space-x-1">
<i data-lucide="pencil" class="w-3 h-3"></i>
<span>Bewerken</span>
</a>
</div>
</div>
@endforeach
</div>
</div>
@endsection
@@ -0,0 +1,528 @@
@extends('layouts.admin')
@section('title', 'Layout & Teksten Aanpassen | Jouwdriedee Beheer')
@section('content')
<div class="space-y-6" x-data="{ activeTab: 'hero' }">
<!-- Header Section -->
<div class="flex flex-col sm:flex-row sm:items-center justify-between pb-6 border-b border-slate-800 gap-4">
<div>
<div class="inline-flex items-center space-x-2 text-xs text-amber-400 font-bold uppercase tracking-wider mb-1">
<i data-lucide="palette" class="w-4 h-4"></i>
<span>Shop Content & Stijl CMS</span>
</div>
<h1 class="font-heading text-2xl sm:text-3xl font-black text-white">Layout & Teksten Beheer</h1>
<p class="text-xs sm:text-sm text-slate-400 mt-1">
Pas alle teksten, titels, USP's, call-to-actions en de lay-out van jouw webshop direct aan. Wijzigingen zijn onmiddellijk live zichtbaar voor bezoekers!
</p>
</div>
<div class="flex items-center space-x-2 self-start sm:self-auto">
<a href="{{ route('home') }}" target="_blank" class="px-4 py-2 rounded-xl bg-slate-800 hover:bg-slate-700 text-slate-200 text-xs font-bold transition flex items-center space-x-1.5 border border-slate-700">
<i data-lucide="eye" class="w-4 h-4 text-sky-400"></i>
<span>Bekijk Live Shop</span>
</a>
<form action="{{ route('admin.content.reset') }}" method="POST" onsubmit="return confirm('Weet je zeker dat je alle teksten wilt resetten naar de standaard fabrieksinstellingen?')">
@csrf
<button type="submit" class="px-3 py-2 rounded-xl bg-slate-800/80 hover:bg-rose-950/60 text-slate-400 hover:text-rose-300 text-xs font-bold transition border border-slate-700/80">
Reset Naar Standaard
</button>
</form>
</div>
</div>
<!-- Main Form -->
<form action="{{ route('admin.content.update') }}" method="POST" class="space-y-6">
@csrf
<!-- Tabs Navigation -->
<div class="flex items-center space-x-2 overflow-x-auto pb-2 border-b border-slate-800 text-xs font-bold">
<button
type="button"
@click="activeTab = 'hero'"
:class="activeTab === 'hero' ? 'bg-amber-400 text-slate-950 shadow-sm' : 'bg-slate-800 text-slate-300 hover:bg-slate-700'"
class="px-4 py-2.5 rounded-xl transition flex items-center space-x-1.5 whitespace-nowrap cursor-pointer"
>
<i data-lucide="sparkles" class="w-3.5 h-3.5"></i>
<span>1. Homepage Hero</span>
</button>
<button
type="button"
@click="activeTab = 'usp'"
:class="activeTab === 'usp' ? 'bg-amber-400 text-slate-950 shadow-sm' : 'bg-slate-800 text-slate-300 hover:bg-slate-700'"
class="px-4 py-2.5 rounded-xl transition flex items-center space-x-1.5 whitespace-nowrap cursor-pointer"
>
<i data-lucide="shield-check" class="w-3.5 h-3.5"></i>
<span>2. Waarom Jouwdriedee (USP's)</span>
</button>
<button
type="button"
@click="activeTab = 'sections'"
:class="activeTab === 'sections' ? 'bg-amber-400 text-slate-950 shadow-sm' : 'bg-slate-800 text-slate-300 hover:bg-slate-700'"
class="px-4 py-2.5 rounded-xl transition flex items-center space-x-1.5 whitespace-nowrap cursor-pointer"
>
<i data-lucide="layers" class="w-3.5 h-3.5"></i>
<span>3. Categorieën & Bestsellers</span>
</button>
<button
type="button"
@click="activeTab = 'announcement'"
:class="activeTab === 'announcement' ? 'bg-amber-400 text-slate-950 shadow-sm' : 'bg-slate-800 text-slate-300 hover:bg-slate-700'"
class="px-4 py-2.5 rounded-xl transition flex items-center space-x-1.5 whitespace-nowrap cursor-pointer"
>
<i data-lucide="megaphone" class="w-3.5 h-3.5"></i>
<span>4. Bovenbalk (Meldingen)</span>
</button>
<button
type="button"
@click="activeTab = 'footer'"
:class="activeTab === 'footer' ? 'bg-amber-400 text-slate-950 shadow-sm' : 'bg-slate-800 text-slate-300 hover:bg-slate-700'"
class="px-4 py-2.5 rounded-xl transition flex items-center space-x-1.5 whitespace-nowrap cursor-pointer"
>
<i data-lucide="info" class="w-3.5 h-3.5"></i>
<span>5. Footer & Contact</span>
</button>
<button
type="button"
@click="activeTab = 'brand'"
:class="activeTab === 'brand' ? 'bg-amber-400 text-slate-950 shadow-sm' : 'bg-slate-800 text-slate-300 hover:bg-slate-700'"
class="px-4 py-2.5 rounded-xl transition flex items-center space-x-1.5 whitespace-nowrap cursor-pointer"
>
<i data-lucide="settings" class="w-3.5 h-3.5"></i>
<span>6. Algemeen & Thema</span>
</button>
</div>
<!-- ==================================================== -->
<!-- TAB 1: HOMEPAGE HERO -->
<!-- ==================================================== -->
<div x-show="activeTab === 'hero'" class="space-y-6">
<div class="p-6 rounded-3xl bg-slate-900 border border-slate-800 space-y-5">
<div class="border-b border-slate-800 pb-3">
<h3 class="font-heading font-black text-lg text-white">Homepage Hero Bovenkant</h3>
<p class="text-xs text-slate-400">De eerste sectie die bezoekers zien bij het openen van de winkel.</p>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Pill Badge Tekst (bovenaan hero)</label>
<input
type="text"
name="hero_badge"
value="{{ setting('hero_badge', 'Nederlandse 3D Printstudio • Bambu Lab Precisie') }}"
class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2.5 text-xs text-white focus:outline-none focus:ring-2 focus:ring-amber-400"
>
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Uitgelichte Kaart Badge (rechts op foto)</label>
<input
type="text"
name="hero_card_badge"
value="{{ setting('hero_card_badge', 'Meest gekozen print') }}"
class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2.5 text-xs text-white focus:outline-none focus:ring-2 focus:ring-amber-400"
>
</div>
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Hero Hoofdtitel (Grote H1)</label>
<input
type="text"
name="hero_title"
value="{{ setting('hero_title', 'Kleurrijke 3D prints, fidget toys & collectibles.') }}"
class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2.5 text-sm font-black text-white focus:outline-none focus:ring-2 focus:ring-amber-400"
>
<p class="text-[11px] text-slate-500">Kies een pakkende, speelse titel die meteen duidelijk maakt wat er te koop is.</p>
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Hero Subtitel / Introductietekst</label>
<textarea
name="hero_subtitle"
rows="3"
class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2.5 text-xs text-white focus:outline-none focus:ring-2 focus:ring-amber-400 leading-relaxed"
>{{ setting('hero_subtitle', 'Van soepel bewegende kristaldraken en geometrische Pokémon planters tot filmprops op schaal. Haarscherp geprint in hoogwaardig Bio-PLA+, stevig PETG of flexibel TPU in jouw favoriete kleur!') }}</textarea>
</div>
<!-- Knoppen in de hero -->
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 pt-2 border-t border-slate-800">
<div class="space-y-2 p-4 rounded-2xl bg-slate-950/60 border border-slate-800">
<span class="text-xs font-black text-amber-400 block">Primaire Actieknop (Gele knop)</span>
<div class="space-y-1.5">
<label class="text-[11px] text-slate-400 font-bold block">Knoptekst</label>
<input type="text" name="hero_primary_btn_text" value="{{ setting('hero_primary_btn_text', 'Bekijk de Collectie') }}" class="w-full bg-slate-900 border border-slate-700 rounded-xl px-3 py-2 text-xs text-white">
</div>
<div class="space-y-1.5">
<label class="text-[11px] text-slate-400 font-bold block">Link URL</label>
<input type="text" name="hero_primary_btn_url" value="{{ setting('hero_primary_btn_url', '/catalogus') }}" class="w-full bg-slate-900 border border-slate-700 rounded-xl px-3 py-2 text-xs text-white">
</div>
</div>
<div class="space-y-2 p-4 rounded-2xl bg-slate-950/60 border border-slate-800">
<span class="text-xs font-black text-violet-400 block">Secundaire Actieknop (Lila knop)</span>
<div class="space-y-1.5">
<label class="text-[11px] text-slate-400 font-bold block">Knoptekst</label>
<input type="text" name="hero_secondary_btn_text" value="{{ setting('hero_secondary_btn_text', 'Fidget Toys & Slugs') }}" class="w-full bg-slate-900 border border-slate-700 rounded-xl px-3 py-2 text-xs text-white">
</div>
<div class="space-y-1.5">
<label class="text-[11px] text-slate-400 font-bold block">Link URL</label>
<input type="text" name="hero_secondary_btn_url" value="{{ setting('hero_secondary_btn_url', '/catalogus?category=fidget-toys') }}" class="w-full bg-slate-900 border border-slate-700 rounded-xl px-3 py-2 text-xs text-white">
</div>
</div>
</div>
<!-- 3 Statistieken / Kwaliteitsbadges -->
<div class="pt-4 border-t border-slate-800">
<span class="text-xs font-black text-slate-200 block mb-3">3 Kwaliteitskenmerken onder de knoppen</span>
<div class="grid grid-cols-1 md:grid-cols-3 gap-3">
<div class="p-3 bg-slate-950 border border-slate-800 rounded-2xl space-y-1.5">
<label class="text-[10px] uppercase font-bold text-slate-400 block">Stat 1 Waarde & Label</label>
<input type="text" name="hero_stat_1_val" value="{{ setting('hero_stat_1_val', '0.12 mm') }}" class="w-full bg-slate-900 border border-slate-700 rounded-lg px-2.5 py-1.5 text-xs text-white font-black">
<input type="text" name="hero_stat_1_lbl" value="{{ setting('hero_stat_1_lbl', 'Minimale laaghoogte') }}" class="w-full bg-slate-900 border border-slate-700 rounded-lg px-2.5 py-1 text-xs text-slate-400">
</div>
<div class="p-3 bg-slate-950 border border-slate-800 rounded-2xl space-y-1.5">
<label class="text-[10px] uppercase font-bold text-slate-400 block">Stat 2 Waarde & Label</label>
<input type="text" name="hero_stat_2_val" value="{{ setting('hero_stat_2_val', 'Bambu Lab') }}" class="w-full bg-slate-900 border border-slate-700 rounded-lg px-2.5 py-1.5 text-xs text-white font-black">
<input type="text" name="hero_stat_2_lbl" value="{{ setting('hero_stat_2_lbl', 'X1-Carbon Precisie') }}" class="w-full bg-slate-900 border border-slate-700 rounded-lg px-2.5 py-1 text-xs text-slate-400">
</div>
<div class="p-3 bg-slate-950 border border-slate-800 rounded-2xl space-y-1.5">
<label class="text-[10px] uppercase font-bold text-slate-400 block">Stat 3 Waarde & Label</label>
<input type="text" name="hero_stat_3_val" value="{{ setting('hero_stat_3_val', '2-3 Dagen') }}" class="w-full bg-slate-900 border border-slate-700 rounded-lg px-2.5 py-1.5 text-xs text-white font-black">
<input type="text" name="hero_stat_3_lbl" value="{{ setting('hero_stat_3_lbl', 'Verzending via PostNL') }}" class="w-full bg-slate-900 border border-slate-700 rounded-lg px-2.5 py-1 text-xs text-slate-400">
</div>
</div>
</div>
</div>
</div>
<!-- ==================================================== -->
<!-- TAB 2: WAAROM JOUWDRIEDEE (USP'S) -->
<!-- ==================================================== -->
<div x-show="activeTab === 'usp'" class="space-y-6">
<div class="p-6 rounded-3xl bg-slate-900 border border-slate-800 space-y-5">
<div class="border-b border-slate-800 pb-3">
<h3 class="font-heading font-black text-lg text-white">Waarom Jouwdriedee? (Voordelen & USP's)</h3>
<p class="text-xs text-slate-400">De 4 kleurrijke informatieblokken onderaan de homepage.</p>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Sectie Tag / Label</label>
<input type="text" name="usp_tag" value="{{ setting('usp_tag', 'Waarom Jouwdriedee.nl?') }}" class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2 text-xs text-white">
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Sectie Hoofdtitel</label>
<input type="text" name="usp_title" value="{{ setting('usp_title', 'Kwaliteit en passie in elke printlaag') }}" class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2 text-xs text-white font-black">
</div>
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Sectie Subtitel</label>
<textarea name="usp_subtitle" rows="2" class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2 text-xs text-white leading-relaxed">{{ setting('usp_subtitle', 'Geen vage levertijden of ruwe prints. Elk model wordt in eigen werkplaats gekalibreerd, geprint en gecontroleerd voordat het veilig verpakt op de post gaat.') }}</textarea>
</div>
<!-- 4 USP Cards -->
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 pt-2 border-t border-slate-800">
<!-- Kaart 1 -->
<div class="p-4 rounded-2xl bg-slate-950/70 border border-violet-500/30 space-y-2">
<span class="text-xs font-black text-violet-400 block">Voordeel 1 (Paars blok)</span>
<input type="text" name="usp_1_title" value="{{ setting('usp_1_title', 'Bambu Lab Precisie') }}" class="w-full bg-slate-900 border border-slate-700 rounded-xl px-3 py-1.5 text-xs text-white font-bold">
<textarea name="usp_1_desc" rows="2" class="w-full bg-slate-900 border border-slate-700 rounded-xl px-3 py-1.5 text-xs text-slate-300">{{ setting('usp_1_desc', 'Haarscherpe lagen vanaf 0.12mm. Vaste toleranties waardoor scharnieren moeiteloos bewegen.') }}</textarea>
</div>
<!-- Kaart 2 -->
<div class="p-4 rounded-2xl bg-slate-950/70 border border-amber-500/30 space-y-2">
<span class="text-xs font-black text-amber-400 block">Voordeel 2 (Geel blok)</span>
<input type="text" name="usp_2_title" value="{{ setting('usp_2_title', '16+ Kleurvariaties') }}" class="w-full bg-slate-900 border border-slate-700 rounded-xl px-3 py-1.5 text-xs text-white font-bold">
<textarea name="usp_2_desc" rows="2" class="w-full bg-slate-900 border border-slate-700 rounded-xl px-3 py-1.5 text-xs text-slate-300">{{ setting('usp_2_desc', 'Van glanzend Silk Goud en Galaxy Zwart tot mat pastel en glow-in-the-dark filament.') }}</textarea>
</div>
<!-- Kaart 3 -->
<div class="p-4 rounded-2xl bg-slate-950/70 border border-emerald-500/30 space-y-2">
<span class="text-xs font-black text-emerald-400 block">Voordeel 3 (Groen blok)</span>
<input type="text" name="usp_3_title" value="{{ setting('usp_3_title', 'Veilig & Duurzaam PLA+') }}" class="w-full bg-slate-900 border border-slate-700 rounded-xl px-3 py-1.5 text-xs text-white font-bold">
<textarea name="usp_3_desc" rows="2" class="w-full bg-slate-900 border border-slate-700 rounded-xl px-3 py-1.5 text-xs text-slate-300">{{ setting('usp_3_desc', 'Gemaakt van hernieuwbare plantaardige zetmelen. Geurloos, gifvrij en stevig in gebruik.') }}</textarea>
</div>
<!-- Kaart 4 -->
<div class="p-4 rounded-2xl bg-slate-950/70 border border-sky-500/30 space-y-2">
<span class="text-xs font-black text-sky-400 block">Voordeel 4 (Blauw blok)</span>
<input type="text" name="usp_4_title" value="{{ setting('usp_4_title', 'Snelle Verzending') }}" class="w-full bg-slate-900 border border-slate-700 rounded-xl px-3 py-1.5 text-xs text-white font-bold">
<textarea name="usp_4_desc" rows="2" class="w-full bg-slate-900 border border-slate-700 rounded-xl px-3 py-1.5 text-xs text-slate-300">{{ setting('usp_4_desc', 'Met zorg verpakt in beschermend materiaal. Binnen 2-3 werkdagen verzonden via PostNL.') }}</textarea>
</div>
</div>
<div class="space-y-1.5 pt-2">
<label class="block text-xs font-bold text-slate-300">Knop onder de voordelen</label>
<input type="text" name="usp_btn_text" value="{{ setting('usp_btn_text', 'Bekijk alle 3D prints in de winkel') }}" class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2 text-xs text-white">
</div>
</div>
</div>
<!-- ==================================================== -->
<!-- TAB 3: CATEGORIEËN & BESTSELLERS SECTIES -->
<!-- ==================================================== -->
<div x-show="activeTab === 'sections'" class="space-y-6">
<div class="p-6 rounded-3xl bg-slate-900 border border-slate-800 space-y-5">
<div class="border-b border-slate-800 pb-3">
<h3 class="font-heading font-black text-lg text-white">Categorieën & Collecties Sectie</h3>
<p class="text-xs text-slate-400">Titels van het blok met Fidget Toys, Pokémon en Film & Gaming.</p>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Categorieën Tag</label>
<input type="text" name="categories_tag" value="{{ setting('categories_tag', 'Collecties') }}" class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2 text-xs text-white">
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Categorieën Hoofdtitel</label>
<input type="text" name="categories_title" value="{{ setting('categories_title', 'Ontdek per categorie') }}" class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2 text-xs text-white font-black">
</div>
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Categorieën Omschrijving</label>
<input type="text" name="categories_subtitle" value="{{ setting('categories_subtitle', 'Selecteer een categorie voor alle beschikbare modellen, formaten en kleurstalen.') }}" class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2 text-xs text-white">
</div>
</div>
<div class="p-6 rounded-3xl bg-slate-900 border border-slate-800 space-y-5">
<div class="border-b border-slate-800 pb-3">
<h3 class="font-heading font-black text-lg text-white">Populaire Modellen (Uitgelichte Prints)</h3>
<p class="text-xs text-slate-400">Titels van de product-showcase op de homepage.</p>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Showcase Tag</label>
<input type="text" name="featured_tag" value="{{ setting('featured_tag', 'Selectie') }}" class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2 text-xs text-white">
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Showcase Hoofdtitel</label>
<input type="text" name="featured_title" value="{{ setting('featured_title', 'Populaire modellen') }}" class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2 text-xs text-white font-black">
</div>
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Showcase Omschrijving</label>
<input type="text" name="featured_subtitle" value="{{ setting('featured_subtitle', 'Elk item wordt op bestelling geprint in jouw gewenste kleur en met de hand nagekeken.') }}" class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2 text-xs text-white">
</div>
</div>
</div>
<!-- ==================================================== -->
<!-- TAB 4: BOVENBALK (ANNOUNCEMENT BAR) -->
<!-- ==================================================== -->
<div x-show="activeTab === 'announcement'" class="space-y-6">
<div class="p-6 rounded-3xl bg-slate-900 border border-slate-800 space-y-5">
<div class="border-b border-slate-800 pb-3">
<h3 class="font-heading font-black text-lg text-white">Bovenbalk (Top Announcement Bar)</h3>
<p class="text-xs text-slate-400">De dunne balk helemaal bovenaan de website voor mededelingen en levertijd.</p>
</div>
<div class="flex items-center space-x-3 p-3.5 rounded-2xl bg-slate-950 border border-slate-800">
<input
type="checkbox"
name="announcement_enabled"
id="announcement_enabled"
value="1"
{{ setting('announcement_enabled', '1') == '1' ? 'checked' : '' }}
class="w-4 h-4 rounded text-amber-400 focus:ring-amber-400 bg-slate-900 border-slate-700"
>
<label for="announcement_enabled" class="text-xs font-bold text-slate-200 cursor-pointer">
Bovenbalk tonen op de website
</label>
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Hoofdmededeling (Links op desktop, gecentreerd op mobiel)</label>
<input
type="text"
name="announcement_text"
value="{{ setting('announcement_text', 'Nederlandse 3D Printstudio • Haarscherpe afwerking op Bambu Lab printers') }}"
class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2.5 text-xs text-white"
>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Badge 1 (Bijv. Gratis verzending)</label>
<input
type="text"
name="announcement_badge_1"
value="{{ setting('announcement_badge_1', 'Gratis verzending vanaf € 50,-') }}"
class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2 text-xs text-white"
>
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Badge 2 (Bijv. Levertijd)</label>
<input
type="text"
name="announcement_badge_2"
value="{{ setting('announcement_badge_2', 'Verzending binnen 2-3 werkdagen') }}"
class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2 text-xs text-white"
>
</div>
</div>
</div>
</div>
<!-- ==================================================== -->
<!-- TAB 5: FOOTER & CONTACT -->
<!-- ==================================================== -->
<div x-show="activeTab === 'footer'" class="space-y-6">
<div class="p-6 rounded-3xl bg-slate-900 border border-slate-800 space-y-5">
<div class="border-b border-slate-800 pb-3">
<h3 class="font-heading font-black text-lg text-white">Voettekst (Footer Informatie & Contact)</h3>
<p class="text-xs text-slate-400">Teksten in de donkere voettekst onderaan alle pagina's.</p>
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Korte Bedrijfsomschrijving</label>
<textarea
name="footer_description"
rows="3"
class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2.5 text-xs text-white leading-relaxed"
>{{ setting('footer_description', 'Gespecialiseerd in het 3D printen van gedetailleerde modellen, soepel bewegende fidget toys en iconische popculture figuren. Gemaakt met hoogwaardige filamenten op hypermoderne FDM-printers.') }}</textarea>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Printer Status Badge</label>
<input
type="text"
name="footer_status_text"
value="{{ setting('footer_status_text', 'Printers gekalibreerd & actief') }}"
class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2 text-xs text-white"
>
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Contact E-mailadres</label>
<input
type="email"
name="footer_email"
value="{{ setting('footer_email', 'info@jouwdriedee.nl') }}"
class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2 text-xs text-white"
>
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Verzendmethode Tekst</label>
<input
type="text"
name="footer_shipping_text"
value="{{ setting('footer_shipping_text', 'Snelle verzending via PostNL') }}"
class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2 text-xs text-white"
>
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Betaalmethoden & Betrouwbaarheid</label>
<input
type="text"
name="footer_payment_text"
value="{{ setting('footer_payment_text', 'iDEAL & Bancontact • PostNL Track & Trace') }}"
class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2 text-xs text-white"
>
</div>
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Copyright Tekst (onderste regel)</label>
<input
type="text"
name="footer_copyright"
value="{{ setting('footer_copyright', 'Alle 3D prints worden op bestelling vervaardigd.') }}"
class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2 text-xs text-white"
>
</div>
</div>
</div>
<!-- ==================================================== -->
<!-- TAB 6: BRAND & THEMA -->
<!-- ==================================================== -->
<div x-show="activeTab === 'brand'" class="space-y-6">
<div class="p-6 rounded-3xl bg-slate-900 border border-slate-800 space-y-5">
<div class="border-b border-slate-800 pb-3">
<h3 class="font-heading font-black text-lg text-white">Algemeen & Branding</h3>
<p class="text-xs text-slate-400">Shopnaam, zoekmachine omschrijving en algemene instellingen.</p>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Webshop Naam</label>
<input
type="text"
name="site_name"
value="{{ setting('site_name', 'Jouwdriedee.nl') }}"
class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2.5 text-xs text-white"
>
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Shop Slogan / Ondertitel</label>
<input
type="text"
name="site_tagline"
value="{{ setting('site_tagline', '3D Prints, Fidgets & Collectibles') }}"
class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2.5 text-xs text-white"
>
</div>
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">SEO Meta Omschrijving</label>
<textarea
name="meta_description"
rows="2"
class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2 text-xs text-white leading-relaxed"
>{{ setting('meta_description', 'Jouwdriedee.nl - Kleurrijke en gedetailleerde 3D prints, soepele fidget toys, Pokémon planters en toffe collectibles. Met zorg en precisie geprint in Nederland!') }}</textarea>
</div>
<div class="space-y-1.5 pt-2 border-t border-slate-800">
<label class="block text-xs font-bold text-slate-300">Thema Kleurenpalet</label>
@php $currentTheme = setting('theme_palette', 'default'); @endphp
<select name="theme_palette" class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2.5 text-xs text-white font-bold">
<option value="default" {{ $currentTheme === 'default' ? 'selected' : '' }}>Speels Kleurrijk (Geel, Koraalroze & Zacht Paars) [Standaard]</option>
<option value="violet" {{ $currentTheme === 'violet' ? 'selected' : '' }}>Neon Lila & Cyaan (Fris en modern)</option>
<option value="emerald" {{ $currentTheme === 'emerald' ? 'selected' : '' }}>Eco Mint & Goud (Natuurlijk & Rustig)</option>
</select>
</div>
</div>
</div>
<!-- Sticky Save Action Bar -->
<div class="sticky bottom-4 z-20 p-4 rounded-2xl bg-slate-900/95 backdrop-blur-md border border-amber-400/30 shadow-2xl flex items-center justify-between">
<div class="flex items-center space-x-2 text-xs text-slate-300 font-bold">
<span class="w-2.5 h-2.5 rounded-full bg-emerald-400 animate-pulse"></span>
<span>Wijzigingen worden direct live opgeslagen in de database.</span>
</div>
<button
type="submit"
class="px-6 py-3 rounded-xl bg-amber-400 hover:bg-amber-300 text-slate-950 font-black text-xs sm:text-sm transition flex items-center space-x-2 shadow-lg shadow-amber-400/20 cursor-pointer"
>
<i data-lucide="save" class="w-4 h-4"></i>
<span>Opslaan & Direct Publiceren</span>
</button>
</div>
</form>
</div>
@endsection
@@ -1,4 +1,4 @@
@extends('layouts.app')
@extends('layouts.admin')
@section('title', 'MakerWorld Modellen Importeren | Jouwdriedee.nl Beheer')
@@ -0,0 +1,92 @@
@extends('layouts.admin')
@section('title', 'Bestellingen | Jouwdriedee Beheer')
@section('content')
<div class="space-y-6">
<!-- Header -->
<div class="flex items-center justify-between pb-6 border-b border-slate-800">
<div>
<div class="inline-flex items-center space-x-2 text-xs text-amber-400 font-bold uppercase tracking-wider mb-1">
<i data-lucide="shopping-cart" class="w-4 h-4"></i>
<span>Verkopen & Facturatie</span>
</div>
<h1 class="font-heading text-2xl sm:text-3xl font-black text-white">Bestellingen ({{ $orders->total() }})</h1>
<p class="text-xs sm:text-sm text-slate-400 mt-1">Inzicht in binnengekomen bestellingen, status en klantgegevens.</p>
</div>
</div>
<!-- Orders Table -->
<div class="rounded-3xl bg-slate-900 border border-slate-800 overflow-hidden shadow-xl">
<div class="overflow-x-auto">
<table class="w-full text-left text-xs text-slate-300">
<thead class="bg-slate-950/80 text-[11px] uppercase tracking-wider text-slate-400 font-bold border-b border-slate-800">
<tr>
<th class="py-3.5 px-4">Order #</th>
<th class="py-3.5 px-4">Datum</th>
<th class="py-3.5 px-4">Klant</th>
<th class="py-3.5 px-4">Items</th>
<th class="py-3.5 px-4">Totaal</th>
<th class="py-3.5 px-4">Status</th>
<th class="py-3.5 px-4 text-right">Details</th>
</tr>
</thead>
<tbody class="divide-y divide-slate-800/80 font-medium">
@forelse($orders as $order)
<tr class="hover:bg-slate-800/50 transition">
<td class="py-3.5 px-4 font-mono font-bold text-white">
{{ $order->order_number }}
</td>
<td class="py-3.5 px-4 text-slate-400">
{{ $order->created_at->format('d-m-Y H:i') }}
</td>
<td class="py-3.5 px-4">
<div class="font-bold text-white">{{ $order->customer_name }}</div>
<div class="text-[11px] text-slate-400">{{ $order->customer_email }}</div>
</td>
<td class="py-3.5 px-4">
<span class="px-2 py-0.5 rounded-md bg-slate-800 text-slate-300 text-[11px] font-bold">
{{ $order->items->count() }} items
</span>
</td>
<td class="py-3.5 px-4">
<span class="font-heading font-black text-amber-400 text-sm">{{ $order->formatted_total }}</span>
</td>
<td class="py-3.5 px-4">
<span class="px-2.5 py-1 rounded-full text-[10px] font-black uppercase
@if($order->status === 'completed' || $order->status === 'shipped') bg-emerald-500/20 text-emerald-400
@elseif($order->status === 'printed' || $order->status === 'processing') bg-sky-500/20 text-sky-400
@elseif($order->status === 'cancelled') bg-rose-500/20 text-rose-400
@else bg-amber-500/20 text-amber-400 @endif
">
{{ $order->status }}
</span>
</td>
<td class="py-3.5 px-4 text-right">
<a href="{{ route('admin.orders.show', $order) }}" class="px-3 py-1.5 rounded-xl bg-slate-800 hover:bg-slate-700 text-slate-200 text-xs font-bold transition inline-flex items-center space-x-1">
<span>Bekijken</span>
<i data-lucide="chevron-right" class="w-3 h-3"></i>
</a>
</td>
</tr>
@empty
<tr>
<td colspan="7" class="p-10 text-center text-slate-500">
Nog geen bestellingen binnengekomen.
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
@if($orders->hasPages())
<div class="p-4 border-t border-slate-800 bg-slate-950/60">
{{ $orders->links() }}
</div>
@endif
</div>
</div>
@endsection
+116
View File
@@ -0,0 +1,116 @@
@extends('layouts.admin')
@section('title', 'Bestelling #' . $order->order_number . ' | Jouwdriedee Beheer')
@section('content')
<div class="space-y-6 max-w-5xl mx-auto">
<!-- Header -->
<div class="flex items-center justify-between pb-6 border-b border-slate-800">
<div>
<a href="{{ route('admin.orders.index') }}" class="text-xs text-amber-400 font-bold hover:underline inline-flex items-center space-x-1 mb-1">
<i data-lucide="arrow-left" class="w-3.5 h-3.5"></i>
<span>Terug naar Bestellingen</span>
</a>
<h1 class="font-heading text-2xl font-black text-white">Bestelling #{{ $order->order_number }}</h1>
<p class="text-xs text-slate-400">Geplaatst op {{ $order->created_at->format('d-m-Y om H:i') }}</p>
</div>
<!-- Status update form -->
<form action="{{ route('admin.orders.status', $order) }}" method="POST" class="flex items-center space-x-2">
@csrf
<select name="status" class="bg-slate-900 border border-slate-700 rounded-xl px-3 py-2 text-xs font-bold text-white">
<option value="pending" {{ $order->status === 'pending' ? 'selected' : '' }}>In afwachting</option>
<option value="processing" {{ $order->status === 'processing' ? 'selected' : '' }}>In verwerking</option>
<option value="printed" {{ $order->status === 'printed' ? 'selected' : '' }}>Geprint (Print klaar)</option>
<option value="shipped" {{ $order->status === 'shipped' ? 'selected' : '' }}>Verzonden via PostNL</option>
<option value="completed" {{ $order->status === 'completed' ? 'selected' : '' }}>Afgerond</option>
<option value="cancelled" {{ $order->status === 'cancelled' ? 'selected' : '' }}>Geannuleerd</option>
</select>
<button type="submit" class="px-4 py-2 rounded-xl bg-amber-400 hover:bg-amber-300 text-slate-950 font-black text-xs transition">
Status Bijwerken
</button>
</form>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
<!-- Order Items -->
<div class="md:col-span-2 space-y-4">
<div class="p-6 rounded-3xl bg-slate-900 border border-slate-800 space-y-4">
<h3 class="font-heading font-black text-base text-white">Bestelde 3D Prints</h3>
<div class="divide-y divide-slate-800">
@foreach($order->items as $item)
<div class="py-3.5 flex items-start justify-between gap-4">
<div>
<h4 class="font-bold text-white text-sm">{{ $item->product_name }}</h4>
<div class="text-xs text-slate-400 space-y-0.5 mt-1">
<div><strong>Materiaal:</strong> {{ strtoupper($item->material) }}</div>
<div><strong>Kleur:</strong> {{ $item->color }}</div>
<div><strong>Schaal:</strong> {{ $item->scale ?? '100%' }}</div>
</div>
</div>
<div class="text-right">
<span class="font-heading font-black text-white text-sm">
{{ $item->quantity }}x &euro; {{ number_format($item->unit_price, 2, ',', '.') }}
</span>
<div class="text-xs font-black text-amber-400 mt-1">
&euro; {{ number_format($item->total_price, 2, ',', '.') }}
</div>
</div>
</div>
@endforeach
</div>
<div class="pt-4 border-t border-slate-800 flex items-center justify-between font-heading font-black text-lg text-white">
<span>Totaalbedrag</span>
<span class="text-amber-400">{{ $order->formatted_total }}</span>
</div>
</div>
</div>
<!-- Klantgegevens & Afleveradres -->
<div class="space-y-4">
<div class="p-6 rounded-3xl bg-slate-900 border border-slate-800 space-y-4 text-xs">
<h3 class="font-heading font-black text-base text-white">Klant & Verzendadres</h3>
<div class="space-y-2 text-slate-300">
<div>
<span class="text-slate-500 block text-[10px] uppercase font-bold">Naam</span>
<strong class="text-white">{{ $order->customer_name }}</strong>
</div>
<div>
<span class="text-slate-500 block text-[10px] uppercase font-bold">E-mail</span>
<span>{{ $order->customer_email }}</span>
</div>
@if($order->customer_phone)
<div>
<span class="text-slate-500 block text-[10px] uppercase font-bold">Telefoon</span>
<span>{{ $order->customer_phone }}</span>
</div>
@endif
<div class="pt-2 border-t border-slate-800">
<span class="text-slate-500 block text-[10px] uppercase font-bold">Adres</span>
<div>{{ $order->shipping_street }} {{ $order->shipping_number }}</div>
<div>{{ $order->shipping_postal_code }} {{ $order->shipping_city }}</div>
<div>{{ $order->shipping_country ?? 'Nederland' }}</div>
</div>
</div>
@if($order->notes)
<div class="pt-3 border-t border-slate-800">
<span class="text-slate-500 block text-[10px] uppercase font-bold">Klant Opmerking</span>
<p class="text-slate-300 italic mt-1">{{ $order->notes }}</p>
</div>
@endif
</div>
</div>
</div>
</div>
@endsection
@@ -0,0 +1,110 @@
@extends('layouts.admin')
@section('title', 'Nieuw Product Toevoegen | Jouwdriedee Beheer')
@section('content')
<div class="space-y-6 max-w-4xl mx-auto">
<!-- Header -->
<div class="flex items-center justify-between pb-6 border-b border-slate-800">
<div>
<a href="{{ route('admin.products.index') }}" class="text-xs text-amber-400 font-bold hover:underline inline-flex items-center space-x-1 mb-1">
<i data-lucide="arrow-left" class="w-3.5 h-3.5"></i>
<span>Terug naar Producten</span>
</a>
<h1 class="font-heading text-2xl font-black text-white">Nieuw Product Toevoegen</h1>
</div>
</div>
<!-- Create Form -->
<form action="{{ route('admin.products.store') }}" method="POST" class="space-y-6">
@csrf
<div class="p-6 rounded-3xl bg-slate-900 border border-slate-800 space-y-5">
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<div class="md:col-span-2 space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Productnaam *</label>
<input type="text" name="name" value="{{ old('name') }}" required placeholder="bijv. Articulated Mecha Robot" class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2.5 text-xs text-white font-bold focus:outline-none focus:ring-2 focus:ring-amber-400">
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Categorie *</label>
<select name="category_id" required class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3 py-2.5 text-xs text-white font-bold">
@foreach($categories as $cat)
<option value="{{ $cat->id }}" {{ old('category_id') == $cat->id ? 'selected' : '' }}>
{{ $cat->name }}
</option>
@endforeach
</select>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Basisprijs (€) *</label>
<input type="number" step="0.01" name="base_price" value="{{ old('base_price', '14.95') }}" required class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2.5 text-xs text-white font-bold">
</div>
<div class="md:col-span-2 space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Afbeelding Pad of URL</label>
<input type="text" name="image_url" value="{{ old('image_url', '/images/products/crystal-dragon.jpg') }}" placeholder="/images/products/naam.jpg of https://..." class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2.5 text-xs text-white">
</div>
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Korte Omschrijving (voor overzichtskaarten)</label>
<textarea name="short_description" rows="2" class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2 text-xs text-white">{{ old('short_description') }}</textarea>
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Volledige Productbeschrijving *</label>
<textarea name="description" rows="5" required class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2.5 text-xs text-white leading-relaxed">{{ old('description') }}</textarea>
</div>
<!-- Print Specs -->
<div class="grid grid-cols-1 sm:grid-cols-3 gap-4 pt-3 border-t border-slate-800">
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Afmetingen (LxBxH)</label>
<input type="text" name="dimensions" value="{{ old('dimensions', '15 x 10 x 8 cm') }}" class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3 py-2 text-xs text-white">
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Gewicht (gram)</label>
<input type="number" name="weight_grams" value="{{ old('weight_grams', '85') }}" class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3 py-2 text-xs text-white">
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Printtijd (uren)</label>
<input type="number" step="0.1" name="print_time_hours" value="{{ old('print_time_hours', '4.5') }}" class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3 py-2 text-xs text-white">
</div>
</div>
<!-- Toggles -->
<div class="pt-3 border-t border-slate-800 flex items-center space-x-6">
<label class="flex items-center space-x-2 cursor-pointer text-xs font-bold text-slate-200">
<input type="checkbox" name="is_active" value="1" checked class="w-4 h-4 rounded text-amber-400 bg-slate-950 border-slate-700">
<span>Direct zichtbaar in webshop (Actief)</span>
</label>
<label class="flex items-center space-x-2 cursor-pointer text-xs font-bold text-slate-200">
<input type="checkbox" name="is_featured" value="1" class="w-4 h-4 rounded text-amber-400 bg-slate-950 border-slate-700">
<span>Uitlichten op homepage</span>
</label>
</div>
</div>
<div class="flex items-center justify-end space-x-3">
<a href="{{ route('admin.products.index') }}" class="px-4 py-2.5 rounded-xl bg-slate-800 text-slate-300 hover:text-white text-xs font-bold transition">
Annuleren
</a>
<button type="submit" class="px-6 py-2.5 rounded-xl bg-amber-400 hover:bg-amber-300 text-slate-950 font-black text-xs transition flex items-center space-x-1.5">
<i data-lucide="plus" class="w-4 h-4"></i>
<span>Product Publiceren</span>
</button>
</div>
</form>
</div>
@endsection
@@ -0,0 +1,116 @@
@extends('layouts.admin')
@section('title', 'Product Bewerken: ' . $product->name . ' | Jouwdriedee Beheer')
@section('content')
<div class="space-y-6 max-w-4xl mx-auto">
<!-- Header -->
<div class="flex items-center justify-between pb-6 border-b border-slate-800">
<div>
<a href="{{ route('admin.products.index') }}" class="text-xs text-amber-400 font-bold hover:underline inline-flex items-center space-x-1 mb-1">
<i data-lucide="arrow-left" class="w-3.5 h-3.5"></i>
<span>Terug naar Producten</span>
</a>
<h1 class="font-heading text-2xl font-black text-white">Product Bewerken: {{ $product->name }}</h1>
</div>
<a href="{{ route('product.show', $product->slug) }}" target="_blank" class="px-3.5 py-2 rounded-xl bg-slate-800 hover:bg-slate-700 text-slate-300 hover:text-white text-xs font-bold transition flex items-center space-x-1.5 border border-slate-700">
<span>Bekijk Live</span>
<i data-lucide="external-link" class="w-3.5 h-3.5"></i>
</a>
</div>
<!-- Edit Form -->
<form action="{{ route('admin.products.update', $product) }}" method="POST" class="space-y-6">
@csrf
@method('PUT')
<div class="p-6 rounded-3xl bg-slate-900 border border-slate-800 space-y-5">
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<div class="md:col-span-2 space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Productnaam *</label>
<input type="text" name="name" value="{{ old('name', $product->name) }}" required class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2.5 text-xs text-white font-bold focus:outline-none focus:ring-2 focus:ring-amber-400">
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Categorie *</label>
<select name="category_id" required class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3 py-2.5 text-xs text-white font-bold">
@foreach($categories as $cat)
<option value="{{ $cat->id }}" {{ old('category_id', $product->category_id) == $cat->id ? 'selected' : '' }}>
{{ $cat->name }}
</option>
@endforeach
</select>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Basisprijs (€) *</label>
<input type="number" step="0.01" name="base_price" value="{{ old('base_price', $product->base_price) }}" required class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2.5 text-xs text-white font-bold">
</div>
<div class="md:col-span-2 space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Afbeelding Pad / URL</label>
<input type="text" name="image_url" value="{{ old('image_url', $product->image_url) }}" class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2.5 text-xs text-white">
</div>
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Korte Omschrijving (voor catalogus cards)</label>
<textarea name="short_description" rows="2" class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2 text-xs text-white">{{ old('short_description', $product->short_description) }}</textarea>
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Volledige Productbeschrijving *</label>
<textarea name="description" rows="6" required class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2.5 text-xs text-white leading-relaxed">{{ old('description', $product->description) }}</textarea>
</div>
<!-- Print Specs -->
<div class="grid grid-cols-1 sm:grid-cols-3 gap-4 pt-3 border-t border-slate-800">
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Afmetingen (LxBxH)</label>
<input type="text" name="dimensions" value="{{ old('dimensions', $product->dimensions) }}" placeholder="bijv. 12 x 8 x 10 cm" class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3 py-2 text-xs text-white">
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Gewicht (gram)</label>
<input type="number" name="weight_grams" value="{{ old('weight_grams', $product->weight_grams) }}" class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3 py-2 text-xs text-white">
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Printtijd (uren)</label>
<input type="number" step="0.1" name="print_time_hours" value="{{ old('print_time_hours', $product->print_time_hours) }}" class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3 py-2 text-xs text-white">
</div>
</div>
<!-- Toggles -->
<div class="pt-3 border-t border-slate-800 flex items-center space-x-6">
<label class="flex items-center space-x-2 cursor-pointer text-xs font-bold text-slate-200">
<input type="checkbox" name="is_active" value="1" {{ old('is_active', $product->is_active) ? 'checked' : '' }} class="w-4 h-4 rounded text-amber-400 bg-slate-950 border-slate-700">
<span>Zichtbaar in webshop (Actief)</span>
</label>
<label class="flex items-center space-x-2 cursor-pointer text-xs font-bold text-slate-200">
<input type="checkbox" name="is_featured" value="1" {{ old('is_featured', $product->is_featured) ? 'checked' : '' }} class="w-4 h-4 rounded text-amber-400 bg-slate-950 border-slate-700">
<span>Uitlichten op homepage</span>
</label>
</div>
</div>
<div class="flex items-center justify-end space-x-3">
<a href="{{ route('admin.products.index') }}" class="px-4 py-2.5 rounded-xl bg-slate-800 text-slate-300 hover:text-white text-xs font-bold transition">
Annuleren
</a>
<button type="submit" class="px-6 py-2.5 rounded-xl bg-amber-400 hover:bg-amber-300 text-slate-950 font-black text-xs transition flex items-center space-x-1.5">
<i data-lucide="save" class="w-4 h-4"></i>
<span>Wijzigingen Opslaan</span>
</button>
</div>
</form>
</div>
@endsection
@@ -0,0 +1,170 @@
@extends('layouts.admin')
@section('title', 'Producten Beheren | Jouwdriedee Beheer')
@section('content')
<div class="space-y-6">
<!-- Header -->
<div class="flex flex-col sm:flex-row sm:items-center justify-between pb-6 border-b border-slate-800 gap-4">
<div>
<div class="inline-flex items-center space-x-2 text-xs text-amber-400 font-bold uppercase tracking-wider mb-1">
<i data-lucide="box" class="w-4 h-4"></i>
<span>Assortiment & Voorraad</span>
</div>
<h1 class="font-heading text-2xl sm:text-3xl font-black text-white">Producten Overzicht ({{ $products->total() }})</h1>
<p class="text-xs sm:text-sm text-slate-400 mt-1">Beheer prijzen, teksten, specificaties en afbeeldingen van alle 3D prints.</p>
</div>
<div class="flex items-center space-x-3 self-start sm:self-auto">
<a href="{{ route('admin.makerworld.index') }}" class="px-3.5 py-2 rounded-xl bg-slate-800 hover:bg-slate-700 text-slate-300 hover:text-white text-xs font-bold transition flex items-center space-x-1.5 border border-slate-700">
<i data-lucide="download-cloud" class="w-4 h-4"></i>
<span>MakerWorld Importer</span>
</a>
<a href="{{ route('admin.products.create') }}" class="px-4 py-2 rounded-xl bg-amber-400 hover:bg-amber-300 text-slate-950 font-black text-xs transition flex items-center space-x-1.5 shadow-sm">
<i data-lucide="plus" class="w-4 h-4"></i>
<span>Nieuw Product</span>
</a>
</div>
</div>
<!-- Search & Filters -->
<div class="p-4 rounded-2xl bg-slate-900 border border-slate-800 flex flex-col sm:flex-row items-center justify-between gap-3">
<form action="{{ route('admin.products.index') }}" method="GET" class="w-full sm:w-auto flex-1 flex items-center space-x-2">
<div class="relative flex-1 max-w-md">
<input
type="text"
name="q"
value="{{ request('q') }}"
placeholder="Zoek op naam of omschrijving..."
class="w-full bg-slate-950 border border-slate-700 rounded-xl pl-9 pr-3.5 py-2 text-xs text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-amber-400"
>
<i data-lucide="search" class="w-4 h-4 text-slate-400 absolute left-3 top-1/2 -translate-y-1/2"></i>
</div>
<select name="category_id" onchange="this.form.submit()" class="bg-slate-950 border border-slate-700 rounded-xl px-3 py-2 text-xs text-white">
<option value="">Alle Categorieën</option>
@foreach($categories as $cat)
<option value="{{ $cat->id }}" {{ request('category_id') == $cat->id ? 'selected' : '' }}>{{ $cat->name }}</option>
@endforeach
</select>
<button type="submit" class="px-3 py-2 bg-slate-800 hover:bg-slate-700 text-white rounded-xl text-xs font-bold transition">
Filter
</button>
@if(request()->hasAny(['q', 'category_id']))
<a href="{{ route('admin.products.index') }}" class="text-xs text-rose-400 hover:underline">Wissen</a>
@endif
</form>
</div>
<!-- Products Table -->
<div class="rounded-3xl bg-slate-900 border border-slate-800 overflow-hidden shadow-xl">
<div class="overflow-x-auto">
<table class="w-full text-left text-xs text-slate-300">
<thead class="bg-slate-950/80 text-[11px] uppercase tracking-wider text-slate-400 font-bold border-b border-slate-800">
<tr>
<th class="py-3.5 px-4">Product</th>
<th class="py-3.5 px-4">Categorie</th>
<th class="py-3.5 px-4">Basisprijs</th>
<th class="py-3.5 px-4">Specificaties</th>
<th class="py-3.5 px-4">Status</th>
<th class="py-3.5 px-4 text-right">Acties</th>
</tr>
</thead>
<tbody class="divide-y divide-slate-800/80 font-medium">
@forelse($products as $product)
<tr class="hover:bg-slate-800/50 transition">
<td class="py-3.5 px-4">
<div class="flex items-center space-x-3">
<div class="w-12 h-12 rounded-xl bg-slate-950 overflow-hidden border border-slate-800 flex-shrink-0">
<img src="{{ $product->image_url }}" alt="{{ $product->name }}" class="w-full h-full object-cover">
</div>
<div>
<a href="{{ route('admin.products.edit', $product) }}" class="font-bold text-white hover:text-amber-400 transition block text-sm">
{{ $product->name }}
</a>
<span class="text-[10px] text-slate-500 font-mono">/product/{{ $product->slug }}</span>
</div>
</div>
</td>
<td class="py-3.5 px-4">
@if($product->category)
<span class="px-2 py-0.5 rounded-md bg-slate-800 text-slate-300 text-[11px] font-bold border border-slate-700">
{{ $product->category->name }}
</span>
@else
<span class="text-slate-500">-</span>
@endif
</td>
<td class="py-3.5 px-4">
<span class="font-black text-amber-400 font-heading text-sm">{{ $product->formatted_price }}</span>
</td>
<td class="py-3.5 px-4 text-[11px] text-slate-400 space-y-0.5">
<div>{{ $product->dimensions ?? 'Standaard' }}</div>
<div>~{{ $product->weight_grams ?? 0 }}g &bull; {{ $product->print_time_hours ?? 0 }}u</div>
</td>
<td class="py-3.5 px-4">
<div class="flex flex-col gap-1">
@if($product->is_active)
<span class="inline-flex items-center space-x-1 text-emerald-400 text-[11px] font-bold">
<span class="w-1.5 h-1.5 rounded-full bg-emerald-400"></span>
<span>Actief</span>
</span>
@else
<span class="inline-flex items-center space-x-1 text-slate-500 text-[11px] font-bold">
<span class="w-1.5 h-1.5 rounded-full bg-slate-500"></span>
<span>Verborgen</span>
</span>
@endif
@if($product->is_featured)
<span class="inline-flex items-center text-amber-400 text-[10px] font-bold">
★ Uitgelicht
</span>
@endif
</div>
</td>
<td class="py-3.5 px-4 text-right">
<div class="flex items-center justify-end space-x-2">
<a href="{{ route('product.show', $product->slug) }}" target="_blank" class="p-1.5 rounded-lg bg-slate-800 hover:bg-slate-700 text-slate-300 hover:text-white transition" title="Bekijk in Shop">
<i data-lucide="external-link" class="w-3.5 h-3.5"></i>
</a>
<a href="{{ route('admin.products.edit', $product) }}" class="p-1.5 rounded-lg bg-slate-800 hover:bg-amber-400 text-slate-300 hover:text-slate-950 transition" title="Bewerken">
<i data-lucide="pencil" class="w-3.5 h-3.5"></i>
</a>
<form action="{{ route('admin.products.destroy', $product) }}" method="POST" onsubmit="return confirm('Weet je zeker dat je dit product wilt verwijderen?')">
@csrf
@method('DELETE')
<button type="submit" class="p-1.5 rounded-lg bg-slate-800 hover:bg-rose-500 text-slate-300 hover:text-white transition cursor-pointer" title="Verwijderen">
<i data-lucide="trash-2" class="w-3.5 h-3.5"></i>
</button>
</form>
</div>
</td>
</tr>
@empty
<tr>
<td colspan="6" class="p-8 text-center text-slate-500">
Geen producten gevonden.
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
@if($products->hasPages())
<div class="p-4 border-t border-slate-800 bg-slate-950/60">
{{ $products->links() }}
</div>
@endif
</div>
</div>
@endsection
+132
View File
@@ -0,0 +1,132 @@
<!DOCTYPE html>
<html lang="nl" class="h-full bg-slate-900 text-slate-100 antialiased">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>@yield('title', 'Admin Dashboard | Jouwdriedee.nl')</title>
<link rel="icon" type="image/svg+xml" href="/images/logo-icon.svg">
<!-- Google Fonts: Fredoka & Nunito -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Nunito:wght@400;600;700;800;900&display=swap" rel="stylesheet">
@vite(['resources/css/app.css', 'resources/js/app.js'])
<style>
body { font-family: 'Nunito', system-ui, sans-serif; }
h1, h2, h3, h4, .font-heading { font-family: 'Fredoka', ui-rounded, 'Nunito', sans-serif; }
</style>
</head>
<body class="min-h-full flex flex-col bg-slate-950 text-slate-100" x-data="{ mobileNav: false }">
<!-- Admin Header -->
<header class="bg-slate-900/90 backdrop-blur-md border-b border-slate-800 sticky top-0 z-30">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex items-center justify-between h-16">
<!-- Brand / Logo -->
<div class="flex items-center space-x-6">
<a href="{{ route('admin.content.index') }}" class="flex items-center space-x-3 group">
<img src="/images/logo.svg" alt="Jouwdriedee.nl" class="h-8 w-auto brightness-200 invert">
<span class="px-2 py-0.5 rounded-md bg-amber-400 text-slate-950 font-black text-[10px] uppercase tracking-wider">Beheer</span>
</a>
<!-- Desktop Nav Links -->
<nav class="hidden md:flex items-center space-x-1 text-xs font-bold">
<a href="{{ route('admin.content.index') }}" class="px-3 py-2 rounded-xl transition flex items-center space-x-1.5 {{ request()->routeIs('admin.content.*') ? 'bg-amber-400 text-slate-950 font-black' : 'text-slate-300 hover:text-white hover:bg-slate-800' }}">
<i data-lucide="palette" class="w-4 h-4"></i>
<span>Layout & Teksten</span>
</a>
<a href="{{ route('admin.products.index') }}" class="px-3 py-2 rounded-xl transition flex items-center space-x-1.5 {{ request()->routeIs('admin.products.*') ? 'bg-amber-400 text-slate-950 font-black' : 'text-slate-300 hover:text-white hover:bg-slate-800' }}">
<i data-lucide="box" class="w-4 h-4"></i>
<span>Producten</span>
</a>
<a href="{{ route('admin.categories.index') }}" class="px-3 py-2 rounded-xl transition flex items-center space-x-1.5 {{ request()->routeIs('admin.categories.*') ? 'bg-amber-400 text-slate-950 font-black' : 'text-slate-300 hover:text-white hover:bg-slate-800' }}">
<i data-lucide="folder-tree" class="w-4 h-4"></i>
<span>Categorieën</span>
</a>
<a href="{{ route('admin.orders.index') }}" class="px-3 py-2 rounded-xl transition flex items-center space-x-1.5 {{ request()->routeIs('admin.orders.*') ? 'bg-amber-400 text-slate-950 font-black' : 'text-slate-300 hover:text-white hover:bg-slate-800' }}">
<i data-lucide="shopping-cart" class="w-4 h-4"></i>
<span>Bestellingen</span>
</a>
<a href="{{ route('admin.makerworld.index') }}" class="px-3 py-2 rounded-xl transition flex items-center space-x-1.5 {{ request()->routeIs('admin.makerworld.*') ? 'bg-amber-400 text-slate-950 font-black' : 'text-slate-300 hover:text-white hover:bg-slate-800' }}">
<i data-lucide="download-cloud" class="w-4 h-4"></i>
<span>MakerWorld</span>
</a>
</nav>
</div>
<!-- Right Actions -->
<div class="flex items-center space-x-3">
<a href="{{ route('home') }}" target="_blank" class="px-3 py-1.5 rounded-xl bg-slate-800 hover:bg-slate-700 text-slate-200 text-xs font-bold transition flex items-center space-x-1.5 border border-slate-700">
<span>Naar Webshop</span>
<i data-lucide="external-link" class="w-3.5 h-3.5"></i>
</a>
<!-- Mobile trigger -->
<button @click="mobileNav = !mobileNav" type="button" class="md:hidden p-2 rounded-xl bg-slate-800 text-slate-200 hover:bg-slate-700">
<i data-lucide="menu" class="w-5 h-5"></i>
</button>
</div>
</div>
</div>
<!-- Mobile Drawer -->
<div x-show="mobileNav" x-cloak class="md:hidden border-t border-slate-800 bg-slate-900 px-4 py-3 space-y-1 text-sm font-bold">
<a href="{{ route('admin.content.index') }}" class="block px-3 py-2 rounded-xl {{ request()->routeIs('admin.content.*') ? 'bg-amber-400 text-slate-950' : 'text-slate-300' }}">
🎨 Layout & Teksten
</a>
<a href="{{ route('admin.products.index') }}" class="block px-3 py-2 rounded-xl {{ request()->routeIs('admin.products.*') ? 'bg-amber-400 text-slate-950' : 'text-slate-300' }}">
📦 Producten
</a>
<a href="{{ route('admin.categories.index') }}" class="block px-3 py-2 rounded-xl {{ request()->routeIs('admin.categories.*') ? 'bg-amber-400 text-slate-950' : 'text-slate-300' }}">
📁 Categorieën
</a>
<a href="{{ route('admin.orders.index') }}" class="block px-3 py-2 rounded-xl {{ request()->routeIs('admin.orders.*') ? 'bg-amber-400 text-slate-950' : 'text-slate-300' }}">
🛒 Bestellingen
</a>
<a href="{{ route('admin.makerworld.index') }}" class="block px-3 py-2 rounded-xl {{ request()->routeIs('admin.makerworld.*') ? 'bg-amber-400 text-slate-950' : 'text-slate-300' }}">
🤖 MakerWorld Importer
</a>
</div>
</header>
<!-- Main Admin Container -->
<main class="flex-1 max-w-7xl w-full mx-auto px-4 sm:px-6 lg:px-8 py-6 sm:py-8">
<!-- Flash Alerts -->
@if(session('success'))
<div class="mb-6 p-4 rounded-2xl bg-emerald-950/80 border border-emerald-500/40 text-emerald-200 text-xs sm:text-sm font-bold flex items-center justify-between shadow-lg">
<div class="flex items-center space-x-2.5">
<i data-lucide="check-circle" class="w-5 h-5 text-emerald-400"></i>
<span>{{ session('success') }}</span>
</div>
<a href="{{ route('home') }}" target="_blank" class="px-3 py-1 rounded-xl bg-emerald-500 text-slate-950 font-black text-xs hover:bg-emerald-400 transition flex items-center space-x-1">
<span>Bekijk Live</span>
<i data-lucide="arrow-right" class="w-3.5 h-3.5"></i>
</a>
</div>
@endif
@if(session('error'))
<div class="mb-6 p-4 rounded-2xl bg-rose-950/80 border border-rose-500/40 text-rose-200 text-xs sm:text-sm font-bold flex items-center space-x-2.5 shadow-lg">
<i data-lucide="alert-circle" class="w-5 h-5 text-rose-400"></i>
<span>{{ session('error') }}</span>
</div>
@endif
@yield('content')
</main>
<footer class="border-t border-slate-800/80 py-4 text-center text-xs text-slate-500">
Jouwdriedee.nl Beheerpaneel &bull; Direct gekoppeld aan live webshop
</footer>
</body>
</html>
+36 -32
View File
@@ -3,8 +3,8 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
<title>@yield('title', 'Jouwdriedee.nl | Kleurrijke 3D Prints, Fidget Toys & Collectibles')</title>
<meta name="description" content="@yield('meta_description', 'Jouwdriedee.nl - Kleurrijke en gedetailleerde 3D prints, soepele fidget toys, Pokémon planters en toffe collectibles. Met zorg en precisie geprint in Nederland!')">
<title>@yield('title', setting('site_name', 'Jouwdriedee.nl') . ' | ' . setting('site_tagline', 'Kleurrijke 3D Prints, Fidget Toys & Collectibles'))</title>
<meta name="description" content="@yield('meta_description', setting('meta_description', 'Jouwdriedee.nl - Kleurrijke en gedetailleerde 3D prints, soepele fidget toys, Pokémon planters en toffe collectibles. Met zorg en precisie geprint in Nederland!'))">
<link rel="icon" type="image/svg+xml" href="/images/logo-icon.svg">
<!-- Google Fonts: Fredoka & Nunito -->
@@ -25,25 +25,31 @@
</head>
<body class="min-h-full flex flex-col bg-[#FBFBFA] text-slate-800 selection:bg-amber-300 selection:text-slate-900" x-data="{ mobileMenuOpen: false }">
<!-- Top Announcement Bar (Helder & Fris) -->
<div class="bg-slate-900 text-white text-xs py-2 px-3 sm:px-4 font-bold border-b border-slate-800">
<div class="max-w-7xl mx-auto flex items-center justify-between">
<div class="flex items-center space-x-2 mx-auto sm:mx-0 text-center sm:text-left text-slate-300">
<span class="w-2 h-2 rounded-full bg-emerald-400 animate-pulse"></span>
<span>Nederlandse 3D Printstudio • Haarscherpe afwerking op Bambu Lab printers</span>
</div>
<div class="hidden md:flex items-center space-x-5 text-[11px] text-slate-300">
<span class="flex items-center space-x-1">
<i data-lucide="truck" class="w-3.5 h-3.5 text-amber-400"></i>
<span>Gratis verzending vanaf € 50,-</span>
</span>
<span class="flex items-center space-x-1">
<i data-lucide="clock" class="w-3.5 h-3.5 text-sky-400"></i>
<span>Verzending binnen 2-3 werkdagen</span>
</span>
<!-- Top Announcement Bar (Inschakelbaar en bewerkbaar via Admin) -->
@if(setting('announcement_enabled', '1') == '1')
<div class="bg-slate-900 text-white text-xs py-2 px-3 sm:px-4 font-bold border-b border-slate-800">
<div class="max-w-7xl mx-auto flex items-center justify-between">
<div class="flex items-center space-x-2 mx-auto sm:mx-0 text-center sm:text-left text-slate-300">
<span class="w-2 h-2 rounded-full bg-emerald-400 animate-pulse"></span>
<span>{{ setting('announcement_text', 'Nederlandse 3D Printstudio • Haarscherpe afwerking op Bambu Lab printers') }}</span>
</div>
<div class="hidden md:flex items-center space-x-5 text-[11px] text-slate-300">
@if(setting('announcement_badge_1'))
<span class="flex items-center space-x-1">
<i data-lucide="truck" class="w-3.5 h-3.5 text-amber-400"></i>
<span>{{ setting('announcement_badge_1', 'Gratis verzending vanaf € 50,-') }}</span>
</span>
@endif
@if(setting('announcement_badge_2'))
<span class="flex items-center space-x-1">
<i data-lucide="clock" class="w-3.5 h-3.5 text-sky-400"></i>
<span>{{ setting('announcement_badge_2', 'Verzending binnen 2-3 werkdagen') }}</span>
</span>
@endif
</div>
</div>
</div>
</div>
@endif
<!-- Main Navigation Header -->
<header class="sticky top-0 z-40 bg-white/95 backdrop-blur-md border-b border-slate-200/80 shadow-xs">
@@ -53,7 +59,7 @@
<!-- Catchy Brand Logo -->
<div class="flex items-center space-x-4 sm:space-x-8">
<a href="{{ route('home') }}" class="flex items-center group py-1">
<img src="/images/logo.svg" alt="Jouwdriedee.nl" class="h-9 sm:h-11 w-auto transition-transform duration-200 group-hover:scale-105">
<img src="/images/logo.svg" alt="{{ setting('site_name', 'Jouwdriedee.nl') }}" class="h-9 sm:h-11 w-auto transition-transform duration-200 group-hover:scale-105">
</a>
<!-- Desktop Nav Links -->
@@ -84,7 +90,7 @@
<input
type="text"
name="q"
value="{{ request('q') }}"
value="{{ request('q') }}"
placeholder="Zoek print, model..."
class="w-44 lg:w-56 bg-slate-100/90 border border-slate-200/80 rounded-xl pl-8 pr-3 py-2 text-xs font-semibold text-slate-800 placeholder-slate-400 focus:bg-white focus:outline-none focus:ring-2 focus:ring-rose-400 transition"
>
@@ -120,7 +126,7 @@
<input
type="text"
name="q"
value="{{ request('q') }}"
value="{{ request('q') }}"
placeholder="Zoek print, model..."
class="w-full bg-slate-100 border border-slate-200 rounded-xl pl-9 pr-3.5 py-2.5 text-xs font-semibold placeholder-slate-400"
>
@@ -175,7 +181,7 @@
@yield('content')
</main>
<!-- Footer (Licht, Helder en Betrouwbaar) -->
<!-- Footer (Licht, Helder, Aanpasbaar via Admin) -->
<footer class="bg-slate-900 text-white border-t border-slate-800 pt-12 pb-10 mt-16">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-4 gap-8 pb-10 border-b border-slate-800">
@@ -183,14 +189,14 @@
<!-- Col 1: Brand & Info -->
<div class="space-y-3 sm:col-span-1">
<div class="flex items-center space-x-2.5">
<img src="/images/logo.svg" alt="Jouwdriedee.nl" class="h-8 w-auto brightness-200 invert">
<img src="/images/logo.svg" alt="{{ setting('site_name', 'Jouwdriedee.nl') }}" class="h-8 w-auto brightness-200 invert">
</div>
<p class="text-xs text-slate-300 leading-relaxed font-medium">
Gespecialiseerd in het 3D printen van gedetailleerde modellen, soepel bewegende fidget toys en iconische popculture figuren. Gemaakt met hoogwaardige filamenten op hypermoderne FDM-printers.
{{ setting('footer_description', 'Gespecialiseerd in het 3D printen van gedetailleerde modellen, soepel bewegende fidget toys en iconische popculture figuren. Gemaakt met hoogwaardige filamenten op hypermoderne FDM-printers.') }}
</p>
<div class="inline-flex items-center space-x-1.5 text-[11px] font-bold text-emerald-400 bg-emerald-950/60 px-2.5 py-1 rounded-full border border-emerald-500/30">
<span class="w-2 h-2 rounded-full bg-emerald-400 animate-pulse"></span>
<span>Printers gekalibreerd & actief</span>
<span>{{ setting('footer_status_text', 'Printers gekalibreerd & actief') }}</span>
</div>
</div>
@@ -235,11 +241,11 @@
<div class="p-3 rounded-2xl bg-slate-800/80 border border-slate-700 text-xs space-y-1 font-bold">
<div class="flex items-center space-x-1.5 text-slate-200">
<i data-lucide="mail" class="w-3.5 h-3.5 text-amber-400"></i>
<span>info@jouwdriedee.nl</span>
<span>{{ setting('footer_email', 'info@jouwdriedee.nl') }}</span>
</div>
<div class="flex items-center space-x-1.5 text-slate-200">
<i data-lucide="truck" class="w-3.5 h-3.5 text-amber-400"></i>
<span>Snelle verzending via PostNL</span>
<span>{{ setting('footer_shipping_text', 'Snelle verzending via PostNL') }}</span>
</div>
</div>
</div>
@@ -247,11 +253,9 @@
</div>
<div class="pt-6 flex flex-col sm:flex-row items-center justify-between text-xs text-slate-400 font-bold gap-3 text-center sm:text-left">
<p>&copy; {{ date('Y') }} Jouwdriedee.nl. Alle 3D prints worden op bestelling vervaardigd.</p>
<p>&copy; {{ date('Y') }} {{ setting('site_name', 'Jouwdriedee.nl') }}. {{ setting('footer_copyright', 'Alle 3D prints worden op bestelling vervaardigd.') }}</p>
<div class="flex items-center space-x-3">
<span>iDEAL & Bancontact</span>
<span>•</span>
<span>PostNL Track & Trace</span>
<span>{{ setting('footer_payment_text', 'iDEAL & Bancontact • PostNL Track & Trace') }}</span>
</div>
</div>
</div>
+78 -37
View File
@@ -1,9 +1,9 @@
@extends('layouts.app')
@section('title', 'Jouwdriedee.nl | Kleurrijke 3D Prints, Fidget Toys & Collectibles')
@section('title', setting('site_name', 'Jouwdriedee.nl') . ' | ' . setting('site_tagline', 'Kleurrijke 3D Prints, Fidget Toys & Collectibles'))
@section('content')
<!-- Hero Section (Helder, Kleurrijk & Fris) -->
<!-- Hero Section (Helder, Kleurrijk, Aanpasbaar via Admin) -->
<section class="relative overflow-hidden bg-gradient-to-b from-amber-50/50 via-white to-[#FBFBFA] pt-8 pb-12 sm:pt-14 sm:pb-18 border-b border-slate-200/70">
<div class="relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="grid grid-cols-1 lg:grid-cols-12 gap-8 lg:gap-12 items-center">
@@ -13,26 +13,25 @@
<div class="inline-flex items-center space-x-2 px-3.5 py-1.5 rounded-full bg-white border border-slate-200/80 shadow-2xs text-slate-800 text-xs font-bold">
<span class="w-2 h-2 rounded-full bg-emerald-500 animate-pulse"></span>
<span>Nederlandse 3D Printstudio • Bambu Lab Precisie</span>
<span>{{ setting('hero_badge', 'Nederlandse 3D Printstudio • Bambu Lab Precisie') }}</span>
</div>
<h1 class="font-heading text-3xl sm:text-5xl lg:text-6xl font-black tracking-tight text-slate-900 leading-[1.15]">
Kleurrijke 3D prints, <br class="hidden sm:inline">
<span class="bg-clip-text text-transparent bg-gradient-to-r from-rose-500 via-amber-500 to-indigo-600">fidget toys & collectibles.</span>
{!! nl2br(e(setting('hero_title', 'Kleurrijke 3D prints, fidget toys & collectibles.'))) !!}
</h1>
<p class="text-sm sm:text-base text-slate-600 max-w-xl mx-auto lg:mx-0 font-normal leading-relaxed">
Van soepel bewegende kristaldraken en geometrische Pokémon planters tot filmprops op schaal. Haarscherp geprint in hoogwaardig Bio-PLA+, stevig PETG of flexibel TPU in jouw favoriete kleur!
{{ setting('hero_subtitle', 'Van soepel bewegende kristaldraken en geometrische Pokémon planters tot filmprops op schaal. Haarscherp geprint in hoogwaardig Bio-PLA+, stevig PETG of flexibel TPU in jouw favoriete kleur!') }}
</p>
<!-- Action CTA's -->
<div class="flex flex-col sm:flex-row items-center justify-center lg:justify-start gap-3 pt-2">
<a href="{{ route('catalog') }}" class="w-full sm:w-auto px-7 py-3.5 rounded-2xl bg-amber-400 hover:bg-amber-300 text-slate-950 font-black text-sm flex items-center justify-center space-x-2 transition shadow-xs">
<span>Bekijk de Collectie</span>
<a href="{{ setting('hero_primary_btn_url', route('catalog')) }}" class="w-full sm:w-auto px-7 py-3.5 rounded-2xl bg-amber-400 hover:bg-amber-300 text-slate-950 font-black text-sm flex items-center justify-center space-x-2 transition shadow-xs">
<span>{{ setting('hero_primary_btn_text', 'Bekijk de Collectie') }}</span>
<i data-lucide="arrow-right" class="w-4 h-4"></i>
</a>
<a href="{{ route('catalog', ['category' => 'fidget-toys']) }}" class="w-full sm:w-auto px-6 py-3.5 rounded-2xl bg-violet-100 hover:bg-violet-200 text-violet-900 font-bold text-sm flex items-center justify-center space-x-2 transition">
<span>Fidget Toys & Slugs</span>
<a href="{{ setting('hero_secondary_btn_url', route('catalog', ['category' => 'fidget-toys'])) }}" class="w-full sm:w-auto px-6 py-3.5 rounded-2xl bg-violet-100 hover:bg-violet-200 text-violet-900 font-bold text-sm flex items-center justify-center space-x-2 transition">
<span>{{ setting('hero_secondary_btn_text', 'Fidget Toys & Slugs') }}</span>
<i data-lucide="sparkles" class="w-4 h-4 text-violet-600"></i>
</a>
</div>
@@ -40,16 +39,28 @@
<!-- Technische specificaties / Kwaliteitsbadges -->
<div class="pt-4 grid grid-cols-3 gap-2 sm:gap-4 max-w-md mx-auto lg:mx-0">
<div class="p-3 bg-white border border-slate-200/80 rounded-2xl shadow-2xs text-center">
<div class="text-base sm:text-xl font-black text-slate-900 font-heading">0.12 mm</div>
<div class="text-[10px] sm:text-[11px] font-semibold text-slate-500 mt-0.5">Minimale laaghoogte</div>
<div class="text-base sm:text-xl font-black text-slate-900 font-heading">
{{ setting('hero_stat_1_val', '0.12 mm') }}
</div>
<div class="text-[10px] sm:text-[11px] font-semibold text-slate-500 mt-0.5">
{{ setting('hero_stat_1_lbl', 'Minimale laaghoogte') }}
</div>
</div>
<div class="p-3 bg-white border border-slate-200/80 rounded-2xl shadow-2xs text-center">
<div class="text-base sm:text-xl font-black text-slate-900 font-heading">Bambu Lab</div>
<div class="text-[10px] sm:text-[11px] font-semibold text-slate-500 mt-0.5">X1-Carbon Precisie</div>
<div class="text-base sm:text-xl font-black text-slate-900 font-heading">
{{ setting('hero_stat_2_val', 'Bambu Lab') }}
</div>
<div class="text-[10px] sm:text-[11px] font-semibold text-slate-500 mt-0.5">
{{ setting('hero_stat_2_lbl', 'X1-Carbon Precisie') }}
</div>
</div>
<div class="p-3 bg-white border border-slate-200/80 rounded-2xl shadow-2xs text-center">
<div class="text-base sm:text-xl font-black text-slate-900 font-heading">2-3 Dagen</div>
<div class="text-[10px] sm:text-[11px] font-semibold text-slate-500 mt-0.5">Verzending via PostNL</div>
<div class="text-base sm:text-xl font-black text-slate-900 font-heading">
{{ setting('hero_stat_3_val', '2-3 Dagen') }}
</div>
<div class="text-[10px] sm:text-[11px] font-semibold text-slate-500 mt-0.5">
{{ setting('hero_stat_3_lbl', 'Verzending via PostNL') }}
</div>
</div>
</div>
@@ -60,7 +71,7 @@
<div class="relative rounded-3xl bg-white p-3 sm:p-4 border border-slate-200/90 shadow-lg">
<div class="absolute top-6 right-6 bg-slate-900/90 backdrop-blur-xs text-white font-bold text-[10px] sm:text-xs px-3 py-1 rounded-full shadow-sm z-10">
Meest gekozen print
{{ setting('hero_card_badge', 'Meest gekozen print') }}
</div>
<div class="relative h-64 sm:h-84 rounded-2xl overflow-hidden bg-slate-100">
@@ -98,14 +109,20 @@
</div>
</section>
<!-- 3 Categorieën Grid (Plat, Helder & Speels) -->
<!-- 3 Categorieën Grid (Plat, Helder & Aanpasbaar) -->
<section class="py-12 sm:py-16 bg-white border-b border-slate-200/70">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex flex-col sm:flex-row sm:items-end justify-between mb-8 gap-2">
<div>
<span class="text-xs font-bold uppercase tracking-wider text-rose-500">Collecties</span>
<h2 class="font-heading text-2xl sm:text-3xl font-black text-slate-900 tracking-tight">Ontdek per categorie</h2>
<p class="text-xs text-slate-500 mt-1">Selecteer een categorie voor alle beschikbare modellen, formaten en kleurstalen.</p>
<span class="text-xs font-bold uppercase tracking-wider text-rose-500">
{{ setting('categories_tag', 'Collecties') }}
</span>
<h2 class="font-heading text-2xl sm:text-3xl font-black text-slate-900 tracking-tight">
{{ setting('categories_title', 'Ontdek per categorie') }}
</h2>
<p class="text-xs text-slate-500 mt-1">
{{ setting('categories_subtitle', 'Selecteer een categorie voor alle beschikbare modellen, formaten en kleurstalen.') }}
</p>
</div>
<a href="{{ route('catalog') }}" class="text-xs font-bold text-rose-600 hover:text-rose-700 flex items-center space-x-1 self-start sm:self-auto">
<span>Alle prints bekijken</span>
@@ -170,9 +187,15 @@
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex flex-col sm:flex-row sm:items-end justify-between mb-8 gap-3">
<div>
<span class="text-xs font-bold uppercase tracking-wider text-rose-500">Selectie</span>
<h2 class="font-heading text-2xl sm:text-3xl font-black text-slate-900 tracking-tight">Populaire modellen</h2>
<p class="text-xs text-slate-500 mt-1">Elk item wordt op bestelling geprint in jouw gewenste kleur en met de hand nagekeken.</p>
<span class="text-xs font-bold uppercase tracking-wider text-rose-500">
{{ setting('featured_tag', 'Selectie') }}
</span>
<h2 class="font-heading text-2xl sm:text-3xl font-black text-slate-900 tracking-tight">
{{ setting('featured_title', 'Populaire modellen') }}
</h2>
<p class="text-xs text-slate-500 mt-1">
{{ setting('featured_subtitle', 'Elk item wordt op bestelling geprint in jouw gewenste kleur en met de hand nagekeken.') }}
</p>
</div>
<a href="{{ route('catalog') }}" class="px-4 py-2 rounded-xl bg-white border border-slate-200 text-slate-800 text-xs font-bold hover:bg-slate-50 transition flex items-center space-x-1.5 self-start sm:self-auto shadow-2xs">
<span>Volledige catalogus</span>
@@ -244,17 +267,19 @@
</div>
</section>
<!-- Heldere, Kleurrijke Kwaliteits & Voordelen Banner (Vervangt oude STL upload blok) -->
<!-- Heldere Kwaliteits & Voordelen Banner (Aanpasbaar via Admin) -->
<section class="py-12 sm:py-16 bg-white border-t border-slate-200/80">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="text-center max-w-2xl mx-auto mb-10">
<span class="text-xs font-bold uppercase tracking-wider text-rose-500">Waarom Jouwdriedee.nl?</span>
<span class="text-xs font-bold uppercase tracking-wider text-rose-500">
{{ setting('usp_tag', 'Waarom Jouwdriedee.nl?') }}
</span>
<h2 class="font-heading text-2xl sm:text-3xl font-black text-slate-900 tracking-tight mt-1">
Kwaliteit en passie in elke printlaag
{{ setting('usp_title', 'Kwaliteit en passie in elke printlaag') }}
</h2>
<p class="text-xs sm:text-sm text-slate-500 mt-2 leading-relaxed">
Geen vage levertijden of ruwe prints. Elk model wordt in eigen werkplaats gekalibreerd, geprint en gecontroleerd voordat het veilig verpakt op de post gaat.
{{ setting('usp_subtitle', 'Geen vage levertijden of ruwe prints. Elk model wordt in eigen werkplaats gekalibreerd, geprint en gecontroleerd voordat het veilig verpakt op de post gaat.') }}
</p>
</div>
@@ -264,8 +289,12 @@
<div class="w-10 h-10 rounded-2xl bg-violet-200/60 text-violet-700 flex items-center justify-center font-black">
<i data-lucide="printer" class="w-5 h-5"></i>
</div>
<h3 class="font-heading font-black text-slate-900 text-sm">Bambu Lab Precisie</h3>
<p class="text-xs text-slate-500 leading-relaxed font-medium">Haarscherpe lagen vanaf 0.12mm. Vaste toleranties waardoor scharnieren moeiteloos bewegen.</p>
<h3 class="font-heading font-black text-slate-900 text-sm">
{{ setting('usp_1_title', 'Bambu Lab Precisie') }}
</h3>
<p class="text-xs text-slate-500 leading-relaxed font-medium">
{{ setting('usp_1_desc', 'Haarscherpe lagen vanaf 0.12mm. Vaste toleranties waardoor scharnieren moeiteloos bewegen.') }}
</p>
</div>
<!-- Feature 2 -->
@@ -273,8 +302,12 @@
<div class="w-10 h-10 rounded-2xl bg-amber-200/60 text-amber-800 flex items-center justify-center font-black">
<i data-lucide="palette" class="w-5 h-5"></i>
</div>
<h3 class="font-heading font-black text-slate-900 text-sm">16+ Kleurvariaties</h3>
<p class="text-xs text-slate-500 leading-relaxed font-medium">Van glanzend Silk Goud en Galaxy Zwart tot mat pastel en glow-in-the-dark filament.</p>
<h3 class="font-heading font-black text-slate-900 text-sm">
{{ setting('usp_2_title', '16+ Kleurvariaties') }}
</h3>
<p class="text-xs text-slate-500 leading-relaxed font-medium">
{{ setting('usp_2_desc', 'Van glanzend Silk Goud en Galaxy Zwart tot mat pastel en glow-in-the-dark filament.') }}
</p>
</div>
<!-- Feature 3 -->
@@ -282,8 +315,12 @@
<div class="w-10 h-10 rounded-2xl bg-emerald-200/60 text-emerald-800 flex items-center justify-center font-black">
<i data-lucide="shield-check" class="w-5 h-5"></i>
</div>
<h3 class="font-heading font-black text-slate-900 text-sm">Veilig & Duurzaam PLA+</h3>
<p class="text-xs text-slate-500 leading-relaxed font-medium">Gemaakt van hernieuwbare plantaardige zetmelen. Geurloos, gifvrij en stevig in gebruik.</p>
<h3 class="font-heading font-black text-slate-900 text-sm">
{{ setting('usp_3_title', 'Veilig & Duurzaam PLA+') }}
</h3>
<p class="text-xs text-slate-500 leading-relaxed font-medium">
{{ setting('usp_3_desc', 'Gemaakt van hernieuwbare plantaardige zetmelen. Geurloos, gifvrij en stevig in gebruik.') }}
</p>
</div>
<!-- Feature 4 -->
@@ -291,14 +328,18 @@
<div class="w-10 h-10 rounded-2xl bg-sky-200/60 text-sky-800 flex items-center justify-center font-black">
<i data-lucide="truck" class="w-5 h-5"></i>
</div>
<h3 class="font-heading font-black text-slate-900 text-sm">Snelle Verzending</h3>
<p class="text-xs text-slate-500 leading-relaxed font-medium">Met zorg verpakt in beschermend materiaal. Binnen 2-3 werkdagen verzonden via PostNL.</p>
<h3 class="font-heading font-black text-slate-900 text-sm">
{{ setting('usp_4_title', 'Snelle Verzending') }}
</h3>
<p class="text-xs text-slate-500 leading-relaxed font-medium">
{{ setting('usp_4_desc', 'Met zorg verpakt in beschermend materiaal. Binnen 2-3 werkdagen verzonden via PostNL.') }}
</p>
</div>
</div>
<div class="mt-8 text-center">
<a href="{{ route('catalog') }}" class="inline-flex items-center space-x-2 px-6 py-3 rounded-2xl bg-amber-400 hover:bg-amber-300 text-slate-950 font-black text-xs transition shadow-xs">
<span>Bekijk alle 3D prints in de winkel</span>
<span>{{ setting('usp_btn_text', 'Bekijk alle 3D prints in de winkel') }}</span>
<i data-lucide="arrow-right" class="w-4 h-4"></i>
</a>
</div>
+24 -2
View File
@@ -1,6 +1,10 @@
<?php
use App\Http\Controllers\Admin\CategoryController as AdminCategoryController;
use App\Http\Controllers\Admin\ContentController;
use App\Http\Controllers\Admin\MakerWorldController;
use App\Http\Controllers\Admin\OrderController as AdminOrderController;
use App\Http\Controllers\Admin\ProductController as AdminProductController;
use App\Http\Controllers\CartController;
use App\Http\Controllers\CheckoutController;
use App\Http\Controllers\ShopController;
@@ -73,9 +77,27 @@ Route::get('/afrekenen', [CheckoutController::class, 'index'])->name('checkout.i
Route::post('/afrekenen', [CheckoutController::class, 'store'])->name('checkout.store');
Route::get('/bestelling-ontvangen/{orderNumber}', [CheckoutController::class, 'success'])->name('checkout.success');
// Admin & MakerWorld Beheer
// Admin & CMS Beheer
Route::prefix('admin')->name('admin.')->group(function () {
Route::redirect('/', '/admin/makerworld');
Route::redirect('/', '/admin/content');
// Layout, Stijl & Teksten CMS
Route::get('/content', [ContentController::class, 'index'])->name('content.index');
Route::post('/content', [ContentController::class, 'update'])->name('content.update');
Route::post('/content/reset', [ContentController::class, 'reset'])->name('content.reset');
// Producten Beheer
Route::resource('products', AdminProductController::class)->except(['show']);
// Categorieën Beheer
Route::resource('categories', AdminCategoryController::class)->only(['index', 'edit', 'update']);
// Bestellingen Beheer
Route::get('/orders', [AdminOrderController::class, 'index'])->name('orders.index');
Route::get('/orders/{order}', [AdminOrderController::class, 'show'])->name('orders.show');
Route::post('/orders/{order}/status', [AdminOrderController::class, 'updateStatus'])->name('orders.status');
// MakerWorld Importer
Route::get('/makerworld', [MakerWorldController::class, 'index'])->name('makerworld.index');
Route::post('/makerworld/login', [MakerWorldController::class, 'login'])->name('makerworld.login');
Route::post('/makerworld/verify-code', [MakerWorldController::class, 'verifyCode'])->name('makerworld.verify-code');
+140
View File
@@ -0,0 +1,140 @@
<?php
namespace Tests\Feature;
use App\Models\Category;
use App\Models\Order;
use App\Models\Product;
use App\Models\Setting;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminContentTest extends TestCase
{
use RefreshDatabase;
public function test_admin_content_editor_loads_successfully(): void
{
$response = $this->get(route('admin.content.index'));
$response->assertStatus(200);
$response->assertSee('Homepage Hero');
$response->assertSee('Shop Content & Stijl CMS', false);
}
public function test_admin_can_update_layout_and_texts(): void
{
$payload = [
'site_name' => 'Mega 3D Shop',
'hero_title' => 'Custom 3D Speelgoed & Figuren',
'hero_subtitle' => 'Nieuwe custom introductietekst voor de winkel.',
'hero_primary_btn_text' => 'Direct Winkelen',
'usp_title' => 'Waarom kiezen voor onze prints?',
'footer_email' => 'hallo@mega3d.nl',
'announcement_enabled' => '1',
'announcement_text' => 'Tijdelijke actie: gratis verzending!',
];
$response = $this->post(route('admin.content.update'), $payload);
$response->assertRedirect(route('admin.content.index'));
$response->assertSessionHas('success');
$this->assertSame('Mega 3D Shop', Setting::get('site_name'));
$this->assertSame('Custom 3D Speelgoed & Figuren', Setting::get('hero_title'));
$this->assertSame('hallo@mega3d.nl', Setting::get('footer_email'));
// Homepage should now display the updated content!
$homeResponse = $this->get(route('home'));
$homeResponse->assertStatus(200);
$homeResponse->assertSee('Custom 3D Speelgoed & Figuren');
$homeResponse->assertSee('Nieuwe custom introductietekst voor de winkel.');
$homeResponse->assertSee('Direct Winkelen');
$homeResponse->assertSee('Waarom kiezen voor onze prints?');
$homeResponse->assertSee('hallo@mega3d.nl');
$homeResponse->assertSee('Tijdelijke actie: gratis verzending!');
}
public function test_admin_can_reset_content_to_defaults(): void
{
Setting::set('hero_title', 'Tijdelijke Titel');
$this->assertSame('Tijdelijke Titel', Setting::get('hero_title'));
$response = $this->post(route('admin.content.reset'));
$response->assertRedirect(route('admin.content.index'));
$this->assertNull(Setting::get('hero_title'));
}
public function test_admin_can_view_and_edit_products(): void
{
$category = Category::create([
'name' => 'Fidgets',
'slug' => 'fidgets',
]);
$product = Product::create([
'name' => 'Test Fidget Draak',
'slug' => 'test-fidget-draak',
'category_id' => $category->id,
'base_price' => 12.50,
'short_description' => 'Korte test',
'description' => 'Uitgebreide test beschrijving',
'is_active' => true,
]);
// Products index
$indexResponse = $this->get(route('admin.products.index'));
$indexResponse->assertStatus(200);
$indexResponse->assertSee('Test Fidget Draak');
// Edit page
$editResponse = $this->get(route('admin.products.edit', $product));
$editResponse->assertStatus(200);
$editResponse->assertSee('Test Fidget Draak');
// Update product
$updateResponse = $this->put(route('admin.products.update', $product), [
'name' => 'Aangepaste Fidget Draak',
'category_id' => $category->id,
'base_price' => 18.00,
'short_description' => 'Geüpdatete korte test',
'description' => 'Nieuwe lange beschrijving',
'is_active' => 1,
'is_featured' => 1,
]);
$updateResponse->assertRedirect(route('admin.products.index'));
$this->assertDatabaseHas('products', [
'id' => $product->id,
'name' => 'Aangepaste Fidget Draak',
'base_price' => 18.00,
]);
}
public function test_admin_can_view_orders(): void
{
$order = Order::create([
'order_number' => 'ORD-TEST-999',
'customer_name' => 'Jan Jansen',
'customer_email' => 'jan@example.com',
'shipping_street' => 'Dorpstraat',
'shipping_number' => '1',
'shipping_postal_code' => '1234AB',
'shipping_city' => 'Amsterdam',
'subtotal' => 25.00,
'shipping_cost' => 0.00,
'total' => 25.00,
'status' => 'pending',
]);
$response = $this->get(route('admin.orders.index'));
$response->assertStatus(200);
$response->assertSee('ORD-TEST-999');
$response->assertSee('Jan Jansen');
$showResponse = $this->get(route('admin.orders.show', $order));
$showResponse->assertStatus(200);
$showResponse->assertSee('ORD-TEST-999');
}
}