@extends('layouts.dashboard') @section('content') @php /** * Admin house-ad form — place a free promotion on any placement, assigned to a restaurant. * House ads carry the same "Sponsored" disclosure as paid vendor ads; they simply cost * nothing and go live immediately. * @var array $placements AdCampaign::placements() [key => ['label','desc']] * @var array $restaurants [['id','name'], ...] approved restaurants * @var array $menuItems [['id','restaurant_id','name','category_name'], ...] every approved venue's dishes * @var array $tags [['name','slug'], ...] * @var array $cuisines [['name','slug'], ...] */ $oldVal = static function (string $k, string $def = '') { return (string) \App\Support\Session::old($k, $def); }; $placementKeys = array_keys($placements); $selPlacement = $oldVal('placement', (string) ($placementKeys[0] ?? '')); @endphp @php /* .qm-d2: the dashboard density standard (app.css §35) */ @endphp
@php /* Back rides the floating top bar, as on every detail/editor page — never inside a card. */ @endphp
{{ t_raw('common.back') }}

{{ t_raw('admin.campaigns.form_heading') }}

@csrf
@php /* What the ad sells. Every placement renders a subject (AdCampaign::fieldsFor), and the same column and the same renderers serve a house ad as a paid one, so this is the VENDOR form's field with the venue chosen above deciding which dishes it offers. Options for every approved venue are present and hidden per selection, which keeps the ownership rule the server enforces and the rule the browser shows identical. */ @endphp
{{ t_raw('admin.campaigns.col_placement') }}
@foreach ($placements as $key => $p) @endforeach
@php // Same shared media field the VENDOR campaign form uses — one creative picker, not two. @endphp {!! media_field_html('image', null, ['accept' => 'both', 'id' => 'house-image']) !!}
{{ t_raw('common.cancel') }}
@php /* /.qm-d2 */ @endphp @endsection