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 App\Models\Setting\Setting; use App\Traits\Companies; t..

Decoded Output download

<?php

namespace App\Traits;

use App\Models\Setting\Setting;
use App\Traits\Companies;

trait Settings
{
    use Companies;

    public function getSettingValue(string $key, mixed $default = null): mixed
    {
        $settings = setting()->all();

        if (! empty($settings)) {
            return setting($key, $default);
        }

        $company_id = $this->getCompanyId();

        if (empty($company_id)) {
            return $default;
        }

        $value = Setting::companyId($company_id)->where('key', $key)->pluck('value')->first();

        return $value ?: $default;
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace App\Traits;

use App\Models\Setting\Setting;
use App\Traits\Companies;

trait Settings
{
    use Companies;

    public function getSettingValue(string $key, mixed $default = null): mixed
    {
        $settings = setting()->all();

        if (! empty($settings)) {
            return setting($key, $default);
        }

        $company_id = $this->getCompanyId();

        if (empty($company_id)) {
            return $default;
        }

        $value = Setting::companyId($company_id)->where('key', $key)->pluck('value')->first();

        return $value ?: $default;
    }
}

Function Calls

None

Variables

None

Stats

MD5 ecb1fb521d872ca486e4a193778ef388
Eval Count 0
Decode Time 94 ms