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\Jobs\Banking; use App\Abstracts\Job; use App\Events\Banking\AccountC..

Decoded Output download

<?php

namespace App\Jobs\Banking;

use App\Abstracts\Job;
use App\Events\Banking\AccountCreating;
use App\Events\Banking\AccountCreated;
use App\Interfaces\Job\HasOwner;
use App\Interfaces\Job\HasSource;
use App\Interfaces\Job\ShouldCreate;
use App\Models\Banking\Account;

class CreateAccount extends Job implements HasOwner, HasSource, ShouldCreate
{
    public function handle(): Account
    {
        event(new AccountCreating($this->request));

        \DB::transaction(function () {
            $this->model = Account::create($this->request->all());

            // Set default account
            if ($this->request['default_account']) {
                setting()->set('default.account', $this->model->id);
                setting()->save();
            }
        });

        event(new AccountCreated($this->model, $this->request));

        return $this->model;
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace App\Jobs\Banking;

use App\Abstracts\Job;
use App\Events\Banking\AccountCreating;
use App\Events\Banking\AccountCreated;
use App\Interfaces\Job\HasOwner;
use App\Interfaces\Job\HasSource;
use App\Interfaces\Job\ShouldCreate;
use App\Models\Banking\Account;

class CreateAccount extends Job implements HasOwner, HasSource, ShouldCreate
{
    public function handle(): Account
    {
        event(new AccountCreating($this->request));

        \DB::transaction(function () {
            $this->model = Account::create($this->request->all());

            // Set default account
            if ($this->request['default_account']) {
                setting()->set('default.account', $this->model->id);
                setting()->save();
            }
        });

        event(new AccountCreated($this->model, $this->request));

        return $this->model;
    }
}

Function Calls

None

Variables

None

Stats

MD5 94dfb0c0e9ac2fc99b9f9cc90f3b1c33
Eval Count 0
Decode Time 93 ms