Skip to content

File changes for V3 versus V2 Lifewire Poll Project: Laravel Course 2023 #7

@CodezPoet

Description

@CodezPoet

Hi,

Excellent course, thank you.

I know the course runs with Livewire 2, and the update to 3 is mentioned, just for people who are already running 3, and might run across this, and not know why it is not working.

  1. In CreatePoll.php:
    Link: https://github.com/piotr-jura-udemy/laravel-course-2023/blob/master/livewire-poll/app/Http/Livewire/CreatePoll.php

Lifewire 3 has changed a bit:

$this->emit('pollCreated');

has become

$this->dispatch('pollCreated');

In create-poll.blade.php:

To show the live text when typing in the earlier part of the section it needs to be:

wire.model.live not just wire.model

So, the code is: <input type="text" id="title" wire:model.live="title">

Those were the only Lifewire issues I had with 2 to 3, and running a Laravel 10 install. I don't know if it is possible to install an earlier version of Lifewire properly, I struggled a bit with it. In my experience installing Laravel 10 instead of 11, which th couerse is currently in 10, made things a lot easier for some things.

Overall very happy with the course, you are good at explaining things, keep up the good work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions