Logo white

Anastasia / cloud-bank

Sign in
  • Sign in
  • Project
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • cloud-bank
  • common
  • models
  • Variant.php
  • bug fix
    a442f66d
    Anastasia authored
    2017-09-21 09:29:52 +0300  
    Browse Code ยป
Variant.php 403 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<?php
    /**
     * Created by PhpStorm.
     * User: stes
     * Date: 20.09.17
     * Time: 18:53
     */
    
    namespace common\models;
    
    class Variant extends \artbox\catalog\models\Variant
    {
        public function getProduct()
        {
            return $this->hasOne(Product::className(), [ 'id' => 'product_id' ])
                        ->inverseOf('variants');
        }
    }