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\Models; use App\Events\OrderUpdated; use Illuminate\Database\Eloquen..

Decoded Output download

<?php

namespace App\Models;

use App\Events\OrderUpdated;
use Illuminate\Database\Eloquent\SoftDeletes;

class Order extends BaseModel
{

    use SoftDeletes;

    protected $table = 'orders';

    /**
     * 
     */
    const STATUS_WAIT_PAY = 1;

    /**
     * 
     */
    const STATUS_PENDING = 2;

    /**
     * 
     */
    const STATUS_PROCESSING = 3;

    /**
     * 
     */
    const STATUS_COMPLETED = 4;

    /**
     * 
     */
    const STATUS_FAILURE = 5;

    /**
     * 
     */
    const STATUS_EXPIRED = -1;

    /**
     * 
     */
    const STATUS_ABNORMAL = 6;

    /**
     * 
     */
    const COUPON_BACK_WAIT = 0;

    /**
     * 
     */
    const COUPON_BACK_OK = 1;

    protected $dispatchesEvents = [
        'updated' => OrderUpdated::class
    ];


    /**
     * 
     *
     * @return array
     *
     * @author    assimon<[email protected]>
     * @copyright assimon<[email protected]>
     * @link      http://utf8.hk/
     */
    public static function getStatusMap()
    {
        return [
            self::STATUS_WAIT_PAY => admin_trans('order.fields.status_wait_pay'),
            self::STATUS_PENDING => admin_trans('order.fields.status_pending'),
            self::STATUS_PROCESSING => admin_trans('order.fields.status_processing'),
            self::STATUS_COMPLETED => admin_trans('order.fields.status_completed'),
            self::STATUS_FAILURE => admin_trans('order.fields.status_failure'),
            self::STATUS_ABNORMAL => admin_trans('order.fields.status_abnormal'),
            self::STATUS_EXPIRED => admin_trans('order.fields.status_expired')
        ];
    }

    /**
     * 
     *
     * @return array
     *
     * @author    assimon<[email protected]>
     * @copyright assimon<[email protected]>
     * @link      http://utf8.hk/
     */
    public static function getTypeMap()
    {
        return [
            self::AUTOMATIC_DELIVERY => admin_trans('goods.fields.automatic_delivery'),
            self::MANUAL_PROCESSING => admin_trans('goods.fields.manual_processing')
        ];
    }

    /**
     * 
     *
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     *
     * @author    assimon<[email protected]>
     * @copyright assimon<[email protected]>
     * @link      http://utf8.hk/
     */
    public function goods()
    {
        return $this->belongsTo(Goods::class, 'goods_id');
    }

    /**
     * 
     *
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     *
     * @author    assimon<[email protected]>
     * @copyright assimon<[email protected]>
     * @link      http://utf8.hk/
     */
    public function coupon()
    {
        return $this->belongsTo(Coupon::class, 'coupon_id');
    }

    /**
     * 
     *
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     *
     * @author    assimon<[email protected]>
     * @copyright assimon<[email protected]>
     * @link      http://utf8.hk/
     */
    public function pay()
    {
        return $this->belongsTo(Pay::class, 'pay_id');
    }

}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace App\Models;

use App\Events\OrderUpdated;
use Illuminate\Database\Eloquent\SoftDeletes;

class Order extends BaseModel
{

    use SoftDeletes;

    protected $table = 'orders';

    /**
     * 
     */
    const STATUS_WAIT_PAY = 1;

    /**
     * 
     */
    const STATUS_PENDING = 2;

    /**
     * 
     */
    const STATUS_PROCESSING = 3;

    /**
     * 
     */
    const STATUS_COMPLETED = 4;

    /**
     * 
     */
    const STATUS_FAILURE = 5;

    /**
     * 
     */
    const STATUS_EXPIRED = -1;

    /**
     * 
     */
    const STATUS_ABNORMAL = 6;

    /**
     * 
     */
    const COUPON_BACK_WAIT = 0;

    /**
     * 
     */
    const COUPON_BACK_OK = 1;

    protected $dispatchesEvents = [
        'updated' => OrderUpdated::class
    ];


    /**
     * 
     *
     * @return array
     *
     * @author    assimon<[email protected]>
     * @copyright assimon<[email protected]>
     * @link      http://utf8.hk/
     */
    public static function getStatusMap()
    {
        return [
            self::STATUS_WAIT_PAY => admin_trans('order.fields.status_wait_pay'),
            self::STATUS_PENDING => admin_trans('order.fields.status_pending'),
            self::STATUS_PROCESSING => admin_trans('order.fields.status_processing'),
            self::STATUS_COMPLETED => admin_trans('order.fields.status_completed'),
            self::STATUS_FAILURE => admin_trans('order.fields.status_failure'),
            self::STATUS_ABNORMAL => admin_trans('order.fields.status_abnormal'),
            self::STATUS_EXPIRED => admin_trans('order.fields.status_expired')
        ];
    }

    /**
     * 
     *
     * @return array
     *
     * @author    assimon<[email protected]>
     * @copyright assimon<[email protected]>
     * @link      http://utf8.hk/
     */
    public static function getTypeMap()
    {
        return [
            self::AUTOMATIC_DELIVERY => admin_trans('goods.fields.automatic_delivery'),
            self::MANUAL_PROCESSING => admin_trans('goods.fields.manual_processing')
        ];
    }

    /**
     * 
     *
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     *
     * @author    assimon<[email protected]>
     * @copyright assimon<[email protected]>
     * @link      http://utf8.hk/
     */
    public function goods()
    {
        return $this->belongsTo(Goods::class, 'goods_id');
    }

    /**
     * 
     *
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     *
     * @author    assimon<[email protected]>
     * @copyright assimon<[email protected]>
     * @link      http://utf8.hk/
     */
    public function coupon()
    {
        return $this->belongsTo(Coupon::class, 'coupon_id');
    }

    /**
     * 
     *
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     *
     * @author    assimon<[email protected]>
     * @copyright assimon<[email protected]>
     * @link      http://utf8.hk/
     */
    public function pay()
    {
        return $this->belongsTo(Pay::class, 'pay_id');
    }

}

Function Calls

None

Variables

None

Stats

MD5 4bfc58de25e3d358a156db67c47e4d55
Eval Count 0
Decode Time 148 ms