refactor, better class namespace intergration

This commit is contained in:
Ludovic CANDELLIER
2021-10-04 14:09:51 +02:00
parent a7f661ab10
commit c150be2c3e
26 changed files with 68 additions and 78 deletions

View File

@@ -5,25 +5,25 @@ namespace App\Models\Shop;
use Illuminate\Database\Eloquent\Model;
use Staudenmeir\EloquentHasManyDeep\HasRelationships;
class ArticleNature extends Model
class Shelve extends Model
{
use HasRelationships;
protected $guarded = ['id'];
protected $table = 'shop_article_families';
protected $table = 'shop_shelves';
public function articles()
{
return $this->hasMany('App\Models\Shop\Article');
return $this->hasMany(Article::class);
}
public function prices()
{
return $this->hasMany('App\Models\Shop\Price');
return $this->hasMany(Price::class);
}
public function packages()
{
return $this->hasMany('App\Models\Shop\Package');
return $this->hasMany(Package::class);
}
}