Wire model do not work

Hi!
I have made some changes in typical project, now my app.blade.php is

<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
    <link rel="stylesheet" href="{{ asset('css/style.css') }}">
    <link rel="stylesheet" href="{{ asset('css/coreui-chartjs.css') }}">
</head>
<body class="c-app">
    @include('navigation-sidebar')
    @livewire('navigation-dropdown')
    @yield('content')
    <script src="{{ asset('js/coreui.bundle.min.js') }}"></script>
    @livewireScripts
</body>
</html>

Controller organizations.php

<?php
namespace App\Http\Livewire;
use Livewire\Component;
use App\Models\Organization;
class Organizations extends Component {
    public $organizations, $name, $inn, $kpp, $ogrn, $active, $org_id;
    public $foo = "fooo";
    public $ModalState = false;
    public function render() {
        $this->organizations = Organization::all();
        return view('livewire.organizations');
    }
    
    public function create() {
            $this->resetInputFields();
            $this->openModal();
            dd($this->ModalState);
        }
[...skipped...]
}

Blade component

@extends('layouts.app')
@section('content')
	<input wire:model="foo" type="text" name="foo">   <- do not work

	@foreach($organizations as $org)
		{{ $org->id }} <- that's good
	@endforeach
@endsection

what’s wrong with my setup?

according https://laravel-livewire.com/docs/2.x/rendering-components#custom-layout did changes in render() function as

public function render() {
        $this->organizations = Organization::all();
        return view('livewire.organizations')
                ->extends('layouts.app')
                ->section('content');
    }

that fixs first problem
but I used default blade layout component located at: resources/views/layouts/app.blade.php, why it not worked before?

There is this code in Controller organizations.php

<button wire:click="create()" type="button">Add</button>
@if($ModalState)
    @include('livewire.create-org')
@endif

but clicking does not take effect

did you forget include in head?

@livewireStyles

And remember put blade html code for livewire inside containers (div)

I decide to use another css styles and do not include
@livewireStyles

<div><button wire:click.prevent="create()" type="button" class="btn btn-behance">Add</button></div>
@if($ModalState)
    @include('livewire.create-org')
@endif

the same result

First, could you explain quickly why not put @livewireStyles tag even the docs said do it? In other hand, try make dd at first line of create:

public function create() {
            dd('works');
            $this->resetInputFields();
            $this->openModal();
            dd($this->ModalState);
        }

As I understand @livewireStyles adds some styles to project, not functionality. And if I want to use my own styles why I should add this directive? What for?
Anyway, I tryed with it. It do not helps.
I have add dd(‘works’); The deal is this function create() do not called when I clicking.

<div>
        <h4 class="card-title mb-0">{{ $foo }} @if ($loud) ! @endif @if ($ModalState) ! @else sdfhkshfjk @endif</h4>
        <input wire:model="foo" type="text" name="foo">
        <input wire:model="loud" type="checkbox">
        <div class="small text-muted">September 2019</div>
    </div>

exclamation is appeared when I check the checkbox but button click is not work

Could you check in console browser if that blade is loading the @livewireScripts tag? Check if you have livewire in composer.json installed too

Yes of course it loaded.
It was a working project, I just decided to customize app.blade.php and that’s it. All other components are practically unchanged.

And instead use the @yield tag in app blade use {{ $slot }}

Undefined variable: slot (View: C:\laragon\www\bill\resources\views\layouts\app.blade.php) (View: C:\laragon\www\bill\resources\views\layouts\app.blade.php)


And you said that using the extends function work?

Yes, extends works fine as I showed in #2 post

In some cases have I ever use or create a blade that extends from layout for load the livewire component and is this blade who call in route file, don’t know the cause.