@php /** * Shared media-library picker modal. Emitted ONCE per page by media_field_html() * (the first field renders it; the rest reuse it). Every [data-media-field] on the * page opens this one dialog. assets/js/qm-media-picker.js owns the behaviour; * the endpoint (tenant vs admin scope) is carried on data-media-endpoint. * * @var string $endpoint list/upload/delete base, e.g. '/vendor/media' or '/admin/media' */ $endpoint = $endpoint ?? '/vendor/media'; $isAdmin = str_starts_with($endpoint, '/admin'); @endphp