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 Inertia\SSRHead; use Inertia\Response; use Inertia\ResponseFactory as Ba..

Decoded Output download

<?php

namespace Inertia\SSRHead;

use Inertia\Response;
use Inertia\ResponseFactory as BaseResponseFactory;

class ResponseFactory extends BaseResponseFactory
{
    protected $usingTitleTemplate = false;

    public function titleTemplate($template)
    {
        $this->usingTitleTemplate = true;

        app(HeadManager::class)->titleTemplate($template);

        return $this;
    }

    public function render($component, $props = []): Response
    {
        return tap(parent::render($component, $props), function (Response $response) {
            if ($this->usingTitleTemplate) {
                $response->with('title', app(HeadManager::class)->getFullTitle());
            }
        });
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace Inertia\SSRHead;

use Inertia\Response;
use Inertia\ResponseFactory as BaseResponseFactory;

class ResponseFactory extends BaseResponseFactory
{
    protected $usingTitleTemplate = false;

    public function titleTemplate($template)
    {
        $this->usingTitleTemplate = true;

        app(HeadManager::class)->titleTemplate($template);

        return $this;
    }

    public function render($component, $props = []): Response
    {
        return tap(parent::render($component, $props), function (Response $response) {
            if ($this->usingTitleTemplate) {
                $response->with('title', app(HeadManager::class)->getFullTitle());
            }
        });
    }
}

Function Calls

None

Variables

None

Stats

MD5 db75cbfd9fb1170f18af5592745c5b04
Eval Count 0
Decode Time 102 ms