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 Encore\Admin\Grid\Displayers; use Illuminate\Contracts\Support\Arrayable..

Decoded Output download

<?php

namespace Encore\Admin\Grid\Displayers;

use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Support\Arr;

class Label extends AbstractDisplayer
{
    public function display($style = 'success')
    {
        if ($this->value instanceof Arrayable) {
            $this->value = $this->value->toArray();
        }

        return collect((array) $this->value)->map(function ($item) use ($style) {
            if (is_array($style)) {
                $columnValue = $this->getColumn()->getOriginal();

                if (is_string($columnValue) || is_int($columnValue) || is_bool($columnValue)) {
                    $columnValue = is_bool($columnValue) ? (int) $columnValue : $columnValue;

                    $style = Arr::get($style, $columnValue, 'success');
                } else {
                    $style = Arr::get($style, $item, 'success');
                }
            }

            return "<span class='label label-{$style}'>$item</span>";
        })->implode('&nbsp;');
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace Encore\Admin\Grid\Displayers;

use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Support\Arr;

class Label extends AbstractDisplayer
{
    public function display($style = 'success')
    {
        if ($this->value instanceof Arrayable) {
            $this->value = $this->value->toArray();
        }

        return collect((array) $this->value)->map(function ($item) use ($style) {
            if (is_array($style)) {
                $columnValue = $this->getColumn()->getOriginal();

                if (is_string($columnValue) || is_int($columnValue) || is_bool($columnValue)) {
                    $columnValue = is_bool($columnValue) ? (int) $columnValue : $columnValue;

                    $style = Arr::get($style, $columnValue, 'success');
                } else {
                    $style = Arr::get($style, $item, 'success');
                }
            }

            return "<span class='label label-{$style}'>$item</span>";
        })->implode('&nbsp;');
    }
}

Function Calls

None

Variables

None

Stats

MD5 b01aa8e9a1532e5b25fdc30a8bf9d4c0
Eval Count 0
Decode Time 87 ms