Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

do this work with livewire? #136

Open
vahidalvandi opened this issue Nov 14, 2023 · 6 comments
Open

do this work with livewire? #136

vahidalvandi opened this issue Nov 14, 2023 · 6 comments
Assignees
Labels
type:question Further information is requested

Comments

@vahidalvandi
Copy link

If you have any questions feel free to ask
do this work with livewire?

@vahidalvandi vahidalvandi added the type:question Further information is requested label Nov 14, 2023
@tarampampam
Copy link
Collaborator

About 2 years ago I wrote a listener for working with Livewire:

/**
* Target package: <https://github.com/livewire/livewire>.
*/
class ResetLivewireListener implements ListenerInterface
{
/**
* {@inheritdoc}
*/
public function handle($event): void
{
if (!\class_exists(LivewireManager::class)) {
return;
}
if ($event instanceof WithApplication) {
$app = $event->application();
if (!$app->resolved($manager_abstract = LivewireManager::class)) {
return;
}
/** @var LivewireManager $manager */
$manager = $app->make($manager_abstract);
if (\method_exists($manager, 'flushState')) {
$manager->flushState();
}
}
}
}

Does something not work properly?

@vahidalvandi
Copy link
Author

thank you.
but not work dd();

??

@tarampampam
Copy link
Collaborator

Without a detailed example of the source code, I can't say anything useful, sorry.

@vahidalvandi
Copy link
Author

When inside the controller command dd(12); instead of the black screen of this function which is written in 12, it shows an error

This page isn’t working127.0.0.1 is currently unable to handle this request.
HTTP ERROR 500

@tarampampam
Copy link
Collaborator

Hm.. How does it relate to Livewire?

@vahidalvandi
Copy link
Author

It has nothing to do with livewire, it's the same everywhere

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type:question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants