Refactor and localize settings and resources

- Updated GeneralSettings page to include localized labels and structured sections for better organization.
- Enhanced CarouselSlide, Category, Collection, and Product resources with localized model labels and improved form/table configurations.
- Modified HomeController to utilize query builder for better performance and added collection items retrieval.
- Updated views to reflect localized settings and improved layout for collections and footer.
- Adjusted timezone and locale settings in app configuration for better regional support.
This commit is contained in:
Mekan1206
2026-06-04 22:15:18 +05:00
parent b13d61b342
commit 6ea6701963
119 changed files with 5304 additions and 98 deletions

View File

@@ -3,18 +3,14 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Storage;
use Illuminate\Database\Eloquent\Relations\HasMany;
class Collection extends Model
{
protected $fillable = ['title', 'subtitle', 'image', 'order', 'is_active'];
protected $fillable = ['title', 'subtitle', 'order', 'is_active'];
protected static function booted(): void
public function collectionItems(): HasMany
{
static::deleting(function (Collection $collection) {
if ($collection->image) {
Storage::disk('public')->delete($collection->image);
}
});
return $this->hasMany(CollectionItem::class);
}
}