In this snippet:
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Product_variant extends Model
{
protected $primaryKey='variant_id';
public $translationForeignKey = $this->primaryKey;
}
This rule is not working:
public $translationForeignKey = $this->primaryKey;
How can we access this variable that is in the same scope of this class?