[WIP] Add thumb on offers, refactor categories, try to fix counter on relations polymorphic with eage loader, bad pattern !

This commit is contained in:
Ludovic CANDELLIER
2021-12-17 00:30:07 +01:00
parent 2be07ce72c
commit a3c6fc6ebe
26 changed files with 171 additions and 107 deletions

View File

@@ -0,0 +1,16 @@
<?php
namespace App\Models\Core;
use Rinvex\Categories\Models\Category as parentCategory;
use App\Models\Shop\Article;
class Category extends parentCategory
{
public function Articles()
{
// return $this->entries(Article::class);
return $this->morphedByMany(Article::class, 'categorizable');
}
}