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 Webkul\CatalogRule\Models; use Illuminate\Database\Eloquent\Factories\Fa..
Decoded Output download
<?php
namespace Webkul\CatalogRule\Models;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Webkul\Admin\Database\Factories\CatalogRuleFactory;
use Webkul\CatalogRule\Contracts\CatalogRule as CatalogRuleContract;
use Webkul\Core\Models\ChannelProxy;
use Webkul\Customer\Models\CustomerGroupProxy;
class CatalogRule extends Model implements CatalogRuleContract
{
use HasFactory;
/**
* Add fillable property to the model.
*
* @var array
*/
protected $fillable = [
'name',
'description',
'starts_from',
'ends_till',
'status',
'condition_type',
'conditions',
'end_other_rules',
'action_type',
'discount_amount',
'sort_order',
];
/**
* Cast the conditions to the array.
*
* @var array
*/
protected $casts = [
'conditions' => 'array',
];
/**
* Get the channels that owns the catalog rule.
*/
public function channels(): BelongsToMany
{
return $this->belongsToMany(ChannelProxy::modelClass(), 'catalog_rule_channels');
}
/**
* Get the customer groups that owns the catalog rule.
*/
public function customer_groups(): BelongsToMany
{
return $this->belongsToMany(CustomerGroupProxy::modelClass(), 'catalog_rule_customer_groups');
}
/**
* Get the Catalog rule Product that owns the catalog rule
*/
public function catalog_rule_products(): HasMany
{
return $this->hasMany(CatalogRuleProductProxy::modelClass());
}
/**
* Get the Catalog rule Product that owns the catalog rule.
*/
public function catalog_rule_product_prices(): HasMany
{
return $this->hasMany(CatalogRuleProductPriceProxy::modelClass());
}
/**
* Create a new factory instance for the model.
*/
protected static function newFactory(): Factory
{
return CatalogRuleFactory::new();
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Webkul\CatalogRule\Models;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Webkul\Admin\Database\Factories\CatalogRuleFactory;
use Webkul\CatalogRule\Contracts\CatalogRule as CatalogRuleContract;
use Webkul\Core\Models\ChannelProxy;
use Webkul\Customer\Models\CustomerGroupProxy;
class CatalogRule extends Model implements CatalogRuleContract
{
use HasFactory;
/**
* Add fillable property to the model.
*
* @var array
*/
protected $fillable = [
'name',
'description',
'starts_from',
'ends_till',
'status',
'condition_type',
'conditions',
'end_other_rules',
'action_type',
'discount_amount',
'sort_order',
];
/**
* Cast the conditions to the array.
*
* @var array
*/
protected $casts = [
'conditions' => 'array',
];
/**
* Get the channels that owns the catalog rule.
*/
public function channels(): BelongsToMany
{
return $this->belongsToMany(ChannelProxy::modelClass(), 'catalog_rule_channels');
}
/**
* Get the customer groups that owns the catalog rule.
*/
public function customer_groups(): BelongsToMany
{
return $this->belongsToMany(CustomerGroupProxy::modelClass(), 'catalog_rule_customer_groups');
}
/**
* Get the Catalog rule Product that owns the catalog rule
*/
public function catalog_rule_products(): HasMany
{
return $this->hasMany(CatalogRuleProductProxy::modelClass());
}
/**
* Get the Catalog rule Product that owns the catalog rule.
*/
public function catalog_rule_product_prices(): HasMany
{
return $this->hasMany(CatalogRuleProductPriceProxy::modelClass());
}
/**
* Create a new factory instance for the model.
*/
protected static function newFactory(): Factory
{
return CatalogRuleFactory::new();
}
}
Function Calls
None |
Stats
MD5 | e084512ae43c4b5039de99a40c836cf9 |
Eval Count | 0 |
Decode Time | 110 ms |