'product_key', 'notes|description|details' => 'notes', 'cost|amount|price' => 'cost', ]; } /** * @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(); } /** * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function default_tax_rate() { return $this->belongsTo('App\Models\TaxRate'); } }