0

I am using Breeze template. I have below code in register.blade.php file.

<x-dropdown class="form-control" id="exampleFormControlSelect1">
        <xd-item>1</xd-item>
        <xd-item>2</xd-item>
        <xd-item>3</xd-item>
        <xd-item>4</xd-item>
        <xd-item>5</xd-item>
 </x-dropdown>                                                              

(If I remove above code I am not getting any error.)

I am getting below error.

error

My dropdown.blade.php file code is like below

@props(['align' => 'right', 'width' => '48', 'contentClasses' => 'py-1 bg-white'])

@php
switch ($align) {
case 'left':
$alignmentClasses = 'origin-top-left left-0';
break;
case 'top':
$alignmentClasses = 'origin-top';
break;
case 'right':
default:
$alignmentClasses = 'origin-top-right right-0';
break;
}

switch ($width) {
case '48':
$width = 'w-48';
break;
}
@endphp

<div class="relative" x-data="{ open: false }" @click.away="open = false" @close.stop="open = false">
    <div @click="open = ! open">
        {{ $trigger }}
    </div>

    <div x-show="open" x-transition:enter="transition ease-out duration-200"
        x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-end="transform opacity-100 scale-100"
        x-transition:leave="transition ease-in duration-75" x-transition:leave-start="transform opacity-100 scale-100"
        x-transition:leave-end="transform opacity-0 scale-95"
        class="absolute z-50 mt-2 {{ $width }} rounded-md shadow-lg {{ $alignmentClasses }}" style="display: none;"
        @click="open = false">
        <div class="rounded-md ring-1 ring-black ring-opacity-5 {{ $contentClasses }}">
            {{ $content }}
        </div>
    </div>
</div>

Where is the source of $trigger and $content ? How can I find the root of $trigger and $content ?

How this template system is working ?

abu abu
  • 6,599
  • 19
  • 74
  • 131
  • 1
    Please post the controller or component class which returns this view. – M.D Feb 08 '21 at 03:41
  • Thanks @M.D. Here is the controller class. https://i.stack.imgur.com/hBcOR.png. `create()` is the function. – abu abu Feb 08 '21 at 04:03
  • 1
    return view('auth.register', ['trigger' => here_data_for_trigger, 'content' => here_data_for_content]); this way you can pass data to a view in Laravel. – M.D Feb 08 '21 at 07:16

0 Answers0