td
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
@@ -30,4 +29,12 @@ class Produits extends Model
|
||||
return $this->hasMany('App\Models\Lignes_Commandes', 'produits_id', 'id');
|
||||
}
|
||||
|
||||
public function setDataTree(){
|
||||
foreach($this->Categories as $categorie){
|
||||
$categorie->setCalculatedFields();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user