'product_key', 'notes|description|details' => 'notes', 'cost|amount|price' => 'cost', 'custom_value1' => 'custom_value1', 'custom_value2' => 'custom_value2', ]; } /** * @return mixed */ public function getEntityType() { return ENTITY_PRODUCT; } /** * @param $key * * @return mixed */ public static function findProductByKey($key) { return self::scope()->where('product_key', '=', $key)->first(); } /** * @return mixed */ public function user() { return $this->belongsTo('App\Models\User')->withTrashed(); } }