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 App\Traits; use Illuminate\Support\Collection; trait SaveFromRedirect {..

Decoded Output download

<?php

namespace App\Traits;

use Illuminate\Support\Collection;

trait SaveFromRedirect
{
    public function saveFromRedirect(string $route, ?Collection $parameters = null)
    {
        session()->forget('from');
        if (! $parameters || $parameters->count() === 0) {
            $parameters = $this->parameters;
        }
        $parameters = collect($parameters) ?? collect([]);
        $queries = collect($this->query) ?? collect([]);
        $parameters = $parameters->merge($queries);
        session(['from' => [
            'back' => $this->currentRoute,
            'route' => $route,
            'parameters' => $parameters,
        ]]);

        return redirect()->route($route);
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace App\Traits;

use Illuminate\Support\Collection;

trait SaveFromRedirect
{
    public function saveFromRedirect(string $route, ?Collection $parameters = null)
    {
        session()->forget('from');
        if (! $parameters || $parameters->count() === 0) {
            $parameters = $this->parameters;
        }
        $parameters = collect($parameters) ?? collect([]);
        $queries = collect($this->query) ?? collect([]);
        $parameters = $parameters->merge($queries);
        session(['from' => [
            'back' => $this->currentRoute,
            'route' => $route,
            'parameters' => $parameters,
        ]]);

        return redirect()->route($route);
    }
}

Function Calls

None

Variables

None

Stats

MD5 e1d68d0362e23e315172c1c0a8c6feee
Eval Count 0
Decode Time 97 ms