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:
@@ -2,15 +2,20 @@
|
||||
|
||||
namespace App\Filament\Pages;
|
||||
|
||||
use Filament\Forms\Components\FileUpload;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Components\Textarea;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Pages\SettingsPage;
|
||||
use App\Settings\GeneralSettings as Settings;
|
||||
use Filament\Forms\Components\FileUpload;
|
||||
use Filament\Forms\Components\Textarea;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Pages\SettingsPage;
|
||||
use Filament\Schemas\Components\Section;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
class GeneralSettings extends SettingsPage
|
||||
{
|
||||
protected static ?string $navigationLabel = 'Umumy Sazlamalar';
|
||||
|
||||
protected static ?string $title = 'Umumy Sazlamalar';
|
||||
|
||||
protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-cog-6-tooth';
|
||||
|
||||
protected static string $settings = Settings::class;
|
||||
@@ -19,22 +24,57 @@ class GeneralSettings extends SettingsPage
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
TextInput::make('marquee_text')
|
||||
->required(),
|
||||
TextInput::make('about_title')
|
||||
->required(),
|
||||
Textarea::make('about_text')
|
||||
->required(),
|
||||
FileUpload::make('about_image')
|
||||
->image()
|
||||
->visibility('public')
|
||||
->directory('settings'),
|
||||
Textarea::make('footer_address')
|
||||
->required(),
|
||||
TextInput::make('footer_phone')
|
||||
->required(),
|
||||
TextInput::make('footer_copyright')
|
||||
->required(),
|
||||
Section::make('Umumy')->schema([
|
||||
TextInput::make('site_title')
|
||||
->label('Saýdyň ady')
|
||||
->required(),
|
||||
TextInput::make('marquee_text')
|
||||
->label('Hereketli tekst')
|
||||
->required(),
|
||||
]),
|
||||
|
||||
Section::make('Biz barada')->schema([
|
||||
TextInput::make('about_label')
|
||||
->label('Biz barada kiçi tekst')
|
||||
->required(),
|
||||
TextInput::make('about_title')
|
||||
->label('Biz barada sözbaşy')
|
||||
->required(),
|
||||
Textarea::make('about_text')
|
||||
->label('Biz barada tekst')
|
||||
->required(),
|
||||
FileUpload::make('about_image')
|
||||
->label('Biz barada surat')
|
||||
->image()
|
||||
->visibility('public')
|
||||
->directory('settings'),
|
||||
]),
|
||||
|
||||
Section::make('Sosial torlar we Bizi tapyň')->schema([
|
||||
TextInput::make('find_us_label')
|
||||
->label('Bizi tapyň ýarlyk')
|
||||
->required(),
|
||||
TextInput::make('instagram_url')
|
||||
->label('Instagram URL')
|
||||
->url()
|
||||
->required(),
|
||||
TextInput::make('tiktok_url')
|
||||
->label('TikTok URL')
|
||||
->url()
|
||||
->required(),
|
||||
]),
|
||||
|
||||
Section::make('Podwal')->schema([
|
||||
Textarea::make('footer_address')
|
||||
->label('Podwal salgysy')
|
||||
->required(),
|
||||
TextInput::make('footer_phone')
|
||||
->label('Podwal telefony')
|
||||
->required(),
|
||||
TextInput::make('footer_copyright')
|
||||
->label('Podwal awtorlyk hukugy')
|
||||
->required(),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user