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?