@php $id = $attributes->get('id', 'cropper_' . Str::random(6)); $width = (int) $attributes->get('width', 300); $height = (int) $attributes->get('height', 300); $shape = $attributes->get('shape', 'circle'); // 'circle' or 'square' $folder = $attributes->get('folder', 'uploads'); $filename = $attributes->get('filename', 'image_' . time()); $callback = $attributes->get('callback', ''); // JS function called with (url) after server upload $updateUrl = $attributes->get('update-url', ''); // POST {path} here after server upload $title = $attributes->get('title', $shape === 'circle' ? 'Change Photo' : 'Crop Image'); $outputWidth = (int) $attributes->get('output-width', 0); // final output px width (0 = viewport size) $targetInput = $attributes->get('target-input', ''); // form mode: ID of file input to set result on $previewImg = $attributes->get('preview-img', ''); // ID of img to update with preview $resultCallback = $attributes->get('result-callback', ''); // callback mode: JS fn called with the cropped File @endphp {{-- Cropme assets + .tc-* styles now live in layouts/app.blade.php
so they survive SPA-nav innerHTML swaps on #main. --}} {{-- Modal --}}