🚀 Hostinger Optimized
🖥️ Server: LiteSpeed
💻 System: Linux s20058.bom1.stableserver.net 5.14.0-611.55.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 19 15:19:29 EDT 2026 x86_64
👤 User: skhata (1324)
🐘 PHP: 8.4.20
🚫 Disabled: ✨ NONE

💻 Terminal

📁 /home/skhata/chandrasons.com/public
$

📄 ProductCategory.php

📁 Path: //home7/skhata/chandrasons.com/app/Models/ProductCategory.php
📊 Size: 681 B
🔒 Perm: 0644
📝 MIME: text/x-php
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Spatie\Translatable\HasTranslations;

class ProductCategory extends Model {
    use HasTranslations;
    protected $fillable = ['slug','icon','name','description','image','sort_order','is_active'];
    public $translatable = ['name','description'];
    protected $casts = ['is_active' => 'boolean'];
    public function products(): HasMany { return $this->hasMany(Product::class, 'category_id'); }
    public function scopeActive($q) { return $q->where('is_active', true)->orderBy('sort_order'); }
    public function getRouteKeyName() { return 'slug'; }
}
← Back📥 Raw✏️ Edit🔒 Chmod
✨ File Manager Magic ✨