'ID', 'id_distribution' => 'Distribution', 'id_product' => 'Produit', 'active' => 'Actif', 'quantity_max' => 'Quantité max', ]; } /* * Relations */ public function getProduct() { return $this->hasOne(Product::class, ['id' => 'id_product']); } public function populateProduct(Product $product): void { $this->populateFieldObject('id_product', 'product', $product); } public function getDistribution() { return $this->hasOne(Distribution::class, ['id' => 'id_distribution']); } public function populateDistribution(Distribution $distribution): void { $this->populateFieldObject('id_distribution', 'distribution', $distribution); } }