Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php namespace Livewire\Features\SupportSession; use Livewire\Attributes\Session; use T..

Decoded Output download

<?php

namespace Livewire\Features\SupportSession;

use Livewire\Attributes\Session;
use Tests\BrowserTestCase;
use Livewire\Component;
use Livewire\Livewire;

class BrowserTest extends BrowserTestCase
{
    public function test_can_persist_a_property_to_the_session()
    {
        Livewire::visit(new class extends Component {
            #[Session]
            public $count = 0;

            public function increment()
            {
                $this->count++;
            }

            public function render() { return <<<'HTML'
            <div>
                <button dusk="button" wire:click="increment">+</button>
                <span dusk="count">{{ $count }}</span>
            </div>
            HTML; }
        })
            ->assertSeeIn('@count', '0')
            ->waitForLivewire()->click('@button')
            ->assertSeeIn('@count', '1')
            ->refresh()
            ->assertSeeIn('@count', '1')
            ->waitForLivewire()->click('@button')
            ->assertSeeIn('@count', '2')
            ;
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace Livewire\Features\SupportSession;

use Livewire\Attributes\Session;
use Tests\BrowserTestCase;
use Livewire\Component;
use Livewire\Livewire;

class BrowserTest extends BrowserTestCase
{
    public function test_can_persist_a_property_to_the_session()
    {
        Livewire::visit(new class extends Component {
            #[Session]
            public $count = 0;

            public function increment()
            {
                $this->count++;
            }

            public function render() { return <<<'HTML'
            <div>
                <button dusk="button" wire:click="increment">+</button>
                <span dusk="count">{{ $count }}</span>
            </div>
            HTML; }
        })
            ->assertSeeIn('@count', '0')
            ->waitForLivewire()->click('@button')
            ->assertSeeIn('@count', '1')
            ->refresh()
            ->assertSeeIn('@count', '1')
            ->waitForLivewire()->click('@button')
            ->assertSeeIn('@count', '2')
            ;
    }
}

Function Calls

None

Variables

None

Stats

MD5 e2b0a9d653e5c09b80ade237803e1aa3
Eval Count 0
Decode Time 110 ms