Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mikethelad's avatar

wire:model

I have a website page with the following code in the blade file

input wire:model="dateFrom" type="date" class="w-full">

This then calls the .php when I select a date, this I can confirm when debugging, however adding this same line to another blade file does not call the .php file when selecting a date and I can't work out why

my app.blade file has this at the bottom

@livewireScripts
@stack('scripts')

<script type="text/javascript" src="/js/site.js"></script>

Any suggestions how I get the new page to call the .php file

0 likes
8 replies
tykus's avatar

adding this same line to another blade file does not call the .php file

This other Blade file is not a Livewire component. Beyond that, you have not shared enough to help you further.

mikethelad's avatar

@tykus

Thanks, the blade files are huge, the one that works is 828 lines and the other is 105 lines, what else do you need to see

mikethelad's avatar

@tykus

Have several like this in the blade file

livewire:components.dashboard
mikethelad's avatar

@tykus

The one that works has this namespace

namespace App\Http\Livewire;

The one that does not work has this namespace

namespace App\Http\Livewire\Components;

If I change it match the working one, the page no longer works

Also the one that works is in the folder

resources/views/livewire/

But the other is in

app\Http\Livewire\Components

tykus's avatar

@mikethelad you're not being clear about what your code looks like, or what you're actually doing.

You have variously said that you have copied this to a separate page

<input wire:model="dateFrom" type="date" class="w-full">

also, something like this 🤷‍♂️

livewire:components.dashboard

I have no idea what I am supposed to debug.

mikethelad's avatar

Is there a way I can upload a copy of each file to make it clear

Please or to participate in this conversation.