Refactor file imports and clean up unused components in various resources: remove unnecessary imports in CommentResource, NewsResource, and SolutionResource, and ensure consistent formatting across files. Add missing newlines at the end of files for better code quality.

This commit is contained in:
nurmuhammet committed 2025-07-28 20:10:34 +05:00
1 parent b23f537086
commit e2323c7949
18 files changed
+287 -291

No files matched your search

+1 -1
View File
@@ -293,4 +293,4 @@ public function getSubheading(): string|Htmlable|null
{ {
return 'Manage the homepage hero section, background video, and call-to-action content.'; return 'Manage the homepage hero section, background video, and call-to-action content.';
} }
} }
+2 -2
View File
@@ -4,9 +4,9 @@
use App\Settings\CtaSettings; use App\Settings\CtaSettings;
use Filament\Forms; use Filament\Forms;
use Filament\Forms\Components\FileUpload;
use Filament\Forms\Form; use Filament\Forms\Form;
use Filament\Pages\SettingsPage; use Filament\Pages\SettingsPage;
use Filament\Forms\Components\FileUpload;
class ManageCtaSettings extends SettingsPage class ManageCtaSettings extends SettingsPage
{ {
@@ -42,4 +42,4 @@ public function form(Form $form): Form
->columnSpan('full'), ->columnSpan('full'),
]); ]);
} }
} }
+261 -261
View File
@@ -37,11 +37,11 @@ public function form(Form $form): Form
->label('Header') ->label('Header')
->required() ->required()
->maxLength(255), ->maxLength(255),
FileUpload::make('solutions_image') FileUpload::make('solutions_image')
->label('Image 1060x453') ->label('Image 1060x453')
->image() ->image()
->directory('solutions') ->directory('solutions')
->required(), ->required(),
Grid::make()->schema([ Grid::make()->schema([
TextInput::make('solutions_button_text') TextInput::make('solutions_button_text')
->label('Button Text') ->label('Button Text')
@@ -93,262 +93,262 @@ public function form(Form $form): Form
private static function getIconOptions(): array private static function getIconOptions(): array
{ {
return [ return [
"microsoft-word" => "microsoft-word", 'microsoft-word' => 'microsoft-word',
"text-box" => "text-box", 'text-box' => 'text-box',
"document-1" => "document-1", 'document-1' => 'document-1',
"layers-1" => "layers-1", 'layers-1' => 'layers-1',
"folder-1" => "folder-1", 'folder-1' => 'folder-1',
"contract" => "contract", 'contract' => 'contract',
"layer" => "layer", 'layer' => 'layer',
"download-pdf" => "download-pdf", 'download-pdf' => 'download-pdf',
"pdf" => "pdf", 'pdf' => 'pdf',
"cloud-computing" => "cloud-computing", 'cloud-computing' => 'cloud-computing',
"downloads" => "downloads", 'downloads' => 'downloads',
"layers" => "layers", 'layers' => 'layers',
"document" => "document", 'document' => 'document',
"light-bulb-1" => "light-bulb-1", 'light-bulb-1' => 'light-bulb-1',
"idea-2" => "idea-2", 'idea-2' => 'idea-2',
"light-bulb" => "light-bulb", 'light-bulb' => 'light-bulb',
"idea-1" => "idea-1", 'idea-1' => 'idea-1',
"solution-2" => "solution-2", 'solution-2' => 'solution-2',
"lightbulb" => "lightbulb", 'lightbulb' => 'lightbulb',
"menus" => "menus", 'menus' => 'menus',
"support-1" => "support-1", 'support-1' => 'support-1',
"swipe-left" => "swipe-left", 'swipe-left' => 'swipe-left',
"development" => "development", 'development' => 'development',
"domain" => "domain", 'domain' => 'domain',
"pets" => "pets", 'pets' => 'pets',
"diagram" => "diagram", 'diagram' => 'diagram',
"targeting" => "targeting", 'targeting' => 'targeting',
"business-intelligence" => "business-intelligence", 'business-intelligence' => 'business-intelligence',
"menu-6" => "menu-6", 'menu-6' => 'menu-6',
"high-quality" => "high-quality", 'high-quality' => 'high-quality',
"campaign" => "campaign", 'campaign' => 'campaign',
"brain" => "brain", 'brain' => 'brain',
"software-application" => "software-application", 'software-application' => 'software-application',
"apps" => "apps", 'apps' => 'apps',
"wrench-1" => "wrench-1", 'wrench-1' => 'wrench-1',
"social-media-marketing-1" => "social-media-marketing-1", 'social-media-marketing-1' => 'social-media-marketing-1',
"category-1" => "category-1", 'category-1' => 'category-1',
"trophy-3" => "trophy-3", 'trophy-3' => 'trophy-3',
"email-marketing" => "email-marketing", 'email-marketing' => 'email-marketing',
"setting" => "setting", 'setting' => 'setting',
"more" => "more", 'more' => 'more',
"menu-5" => "menu-5", 'menu-5' => 'menu-5',
"menu-4" => "menu-4", 'menu-4' => 'menu-4',
"medical" => "medical", 'medical' => 'medical',
"sparkle" => "sparkle", 'sparkle' => 'sparkle',
"menu-3" => "menu-3", 'menu-3' => 'menu-3',
"technology-2" => "technology-2", 'technology-2' => 'technology-2',
"process" => "process", 'process' => 'process',
"hearth-1" => "hearth-1", 'hearth-1' => 'hearth-1',
"hearth" => "hearth", 'hearth' => 'hearth',
"technology-1" => "technology-1", 'technology-1' => 'technology-1',
"category" => "category", 'category' => 'category',
"customer-care" => "customer-care", 'customer-care' => 'customer-care',
"folder" => "folder", 'folder' => 'folder',
"portfolio-1" => "portfolio-1", 'portfolio-1' => 'portfolio-1',
"report" => "report", 'report' => 'report',
"thinking" => "thinking", 'thinking' => 'thinking',
"fingerprint" => "fingerprint", 'fingerprint' => 'fingerprint',
"clock-2" => "clock-2", 'clock-2' => 'clock-2',
"award" => "award", 'award' => 'award',
"paper-plane" => "paper-plane", 'paper-plane' => 'paper-plane',
"repair" => "repair", 'repair' => 'repair',
"email-5" => "email-5", 'email-5' => 'email-5',
"strategy" => "strategy", 'strategy' => 'strategy',
"portfolio" => "portfolio", 'portfolio' => 'portfolio',
"web-design" => "web-design", 'web-design' => 'web-design',
"email-4" => "email-4", 'email-4' => 'email-4',
"down-arrow-1" => "down-arrow-1", 'down-arrow-1' => 'down-arrow-1',
"location-2" => "location-2", 'location-2' => 'location-2',
"phone-call-2" => "phone-call-2", 'phone-call-2' => 'phone-call-2',
"telephone-call" => "telephone-call", 'telephone-call' => 'telephone-call',
"teamwork" => "teamwork", 'teamwork' => 'teamwork',
"up-arrow-1" => "up-arrow-1", 'up-arrow-1' => 'up-arrow-1',
"menu-2" => "menu-2", 'menu-2' => 'menu-2',
"developing" => "developing", 'developing' => 'developing',
"money-bag" => "money-bag", 'money-bag' => 'money-bag',
"thumbs-up" => "thumbs-up", 'thumbs-up' => 'thumbs-up',
"profits" => "profits", 'profits' => 'profits',
"location-1" => "location-1", 'location-1' => 'location-1',
"help-1" => "help-1", 'help-1' => 'help-1',
"online-chat" => "online-chat", 'online-chat' => 'online-chat',
"worker" => "worker", 'worker' => 'worker',
"smart-home" => "smart-home", 'smart-home' => 'smart-home',
"customer-service-1" => "customer-service-1", 'customer-service-1' => 'customer-service-1',
"internet" => "internet", 'internet' => 'internet',
"cash-flow" => "cash-flow", 'cash-flow' => 'cash-flow',
"monitor" => "monitor", 'monitor' => 'monitor',
"search-1" => "search-1", 'search-1' => 'search-1',
"wrench" => "wrench", 'wrench' => 'wrench',
"coin" => "coin", 'coin' => 'coin',
"cash" => "cash", 'cash' => 'cash',
"analyst" => "analyst", 'analyst' => 'analyst',
"dashboard-1" => "dashboard-1", 'dashboard-1' => 'dashboard-1',
"digital" => "digital", 'digital' => 'digital',
"searching" => "searching", 'searching' => 'searching',
"email-3" => "email-3", 'email-3' => 'email-3',
"star-1" => "star-1", 'star-1' => 'star-1',
"touch" => "touch", 'touch' => 'touch',
"medal" => "medal", 'medal' => 'medal',
"world-wide-web-1" => "world-wide-web-1", 'world-wide-web-1' => 'world-wide-web-1',
"phone" => "phone", 'phone' => 'phone',
"social-media" => "social-media", 'social-media' => 'social-media',
"24-7" => "24-7", '24-7' => '24-7',
"hard-work" => "hard-work", 'hard-work' => 'hard-work',
"star" => "star", 'star' => 'star',
"plus" => "plus", 'plus' => 'plus',
"minus-2" => "minus-2", 'minus-2' => 'minus-2',
"menu-1" => "menu-1", 'menu-1' => 'menu-1',
"cloud" => "cloud", 'cloud' => 'cloud',
"handshake" => "handshake", 'handshake' => 'handshake',
"people" => "people", 'people' => 'people',
"ai" => "ai", 'ai' => 'ai',
"save-money" => "save-money", 'save-money' => 'save-money',
"shopping-online" => "shopping-online", 'shopping-online' => 'shopping-online',
"profit-1" => "profit-1", 'profit-1' => 'profit-1',
"blockchain" => "blockchain", 'blockchain' => 'blockchain',
"sales" => "sales", 'sales' => 'sales',
"back-in-time" => "back-in-time", 'back-in-time' => 'back-in-time',
"clock-1" => "clock-1", 'clock-1' => 'clock-1',
"user-3" => "user-3", 'user-3' => 'user-3',
"user-2" => "user-2", 'user-2' => 'user-2',
"pawprint" => "pawprint", 'pawprint' => 'pawprint',
"payment-method" => "payment-method", 'payment-method' => 'payment-method',
"world-wide-web" => "world-wide-web", 'world-wide-web' => 'world-wide-web',
"minus-1" => "minus-1", 'minus-1' => 'minus-1',
"add-1" => "add-1", 'add-1' => 'add-1',
"management" => "management", 'management' => 'management',
"help" => "help", 'help' => 'help',
"chip" => "chip", 'chip' => 'chip',
"artificial-intelligence" => "artificial-intelligence", 'artificial-intelligence' => 'artificial-intelligence',
"group" => "group", 'group' => 'group',
"money-1" => "money-1", 'money-1' => 'money-1',
"conversation" => "conversation", 'conversation' => 'conversation',
"email-2" => "email-2", 'email-2' => 'email-2',
"rating" => "rating", 'rating' => 'rating',
"placeholder" => "placeholder", 'placeholder' => 'placeholder',
"trophy-2" => "trophy-2", 'trophy-2' => 'trophy-2',
"cpu" => "cpu", 'cpu' => 'cpu',
"home" => "home", 'home' => 'home',
"right-arrow-1" => "right-arrow-1", 'right-arrow-1' => 'right-arrow-1',
"like" => "like", 'like' => 'like',
"mail" => "mail", 'mail' => 'mail',
"briefcase" => "briefcase", 'briefcase' => 'briefcase',
"money" => "money", 'money' => 'money',
"up-arrow" => "up-arrow", 'up-arrow' => 'up-arrow',
"trophy-1" => "trophy-1", 'trophy-1' => 'trophy-1',
"user-1" => "user-1", 'user-1' => 'user-1',
"question" => "question", 'question' => 'question',
"team-1" => "team-1", 'team-1' => 'team-1',
"user" => "user", 'user' => 'user',
"email-1" => "email-1", 'email-1' => 'email-1',
"price-tag-1" => "price-tag-1", 'price-tag-1' => 'price-tag-1',
"tag" => "tag", 'tag' => 'tag',
"loupe" => "loupe", 'loupe' => 'loupe',
"right-arrow" => "right-arrow", 'right-arrow' => 'right-arrow',
"left-arrow-1" => "left-arrow-1", 'left-arrow-1' => 'left-arrow-1',
"down-arrow" => "down-arrow", 'down-arrow' => 'down-arrow',
"price-tag" => "price-tag", 'price-tag' => 'price-tag',
"stars" => "stars", 'stars' => 'stars',
"search" => "search", 'search' => 'search',
"phone-call-1" => "phone-call-1", 'phone-call-1' => 'phone-call-1',
"award-symbol" => "award-symbol", 'award-symbol' => 'award-symbol',
"christmas-stars" => "christmas-stars", 'christmas-stars' => 'christmas-stars',
"minus" => "minus", 'minus' => 'minus',
"add" => "add", 'add' => 'add',
"cancel-1" => "cancel-1", 'cancel-1' => 'cancel-1',
"checked" => "checked", 'checked' => 'checked',
"cyber-security" => "cyber-security", 'cyber-security' => 'cyber-security',
"data-protection" => "data-protection", 'data-protection' => 'data-protection',
"hosting" => "hosting", 'hosting' => 'hosting',
"brand-awareness" => "brand-awareness", 'brand-awareness' => 'brand-awareness',
"ux-design" => "ux-design", 'ux-design' => 'ux-design',
"influencer" => "influencer", 'influencer' => 'influencer',
"online-advertising" => "online-advertising", 'online-advertising' => 'online-advertising',
"web-management" => "web-management", 'web-management' => 'web-management',
"seo-1" => "seo-1", 'seo-1' => 'seo-1',
"computer" => "computer", 'computer' => 'computer',
"software-development" => "software-development", 'software-development' => 'software-development',
"coding-1" => "coding-1", 'coding-1' => 'coding-1',
"coding" => "coding", 'coding' => 'coding',
"app-development" => "app-development", 'app-development' => 'app-development',
"content-marketing" => "content-marketing", 'content-marketing' => 'content-marketing',
"social-media-marketing" => "social-media-marketing", 'social-media-marketing' => 'social-media-marketing',
"analysis-1" => "analysis-1", 'analysis-1' => 'analysis-1',
"twitter" => "twitter", 'twitter' => 'twitter',
"repairing" => "repairing", 'repairing' => 'repairing',
"data-visualization" => "data-visualization", 'data-visualization' => 'data-visualization',
"information-technology" => "information-technology", 'information-technology' => 'information-technology',
"statistics-1" => "statistics-1", 'statistics-1' => 'statistics-1',
"exploration" => "exploration", 'exploration' => 'exploration',
"project-1" => "project-1", 'project-1' => 'project-1',
"cross-mark" => "cross-mark", 'cross-mark' => 'cross-mark',
"search-analysis" => "search-analysis", 'search-analysis' => 'search-analysis',
"system" => "system", 'system' => 'system',
"hashtag-1" => "hashtag-1", 'hashtag-1' => 'hashtag-1',
"hashtag" => "hashtag", 'hashtag' => 'hashtag',
"it-department" => "it-department", 'it-department' => 'it-department',
"creative" => "creative", 'creative' => 'creative',
"online-analytical" => "online-analytical", 'online-analytical' => 'online-analytical',
"secure-data" => "secure-data", 'secure-data' => 'secure-data',
"slash" => "slash", 'slash' => 'slash',
"creative-thinking" => "creative-thinking", 'creative-thinking' => 'creative-thinking',
"right-up" => "right-up", 'right-up' => 'right-up',
"dashboard" => "dashboard", 'dashboard' => 'dashboard',
"profit" => "profit", 'profit' => 'profit',
"project" => "project", 'project' => 'project',
"phone-call" => "phone-call", 'phone-call' => 'phone-call',
"seo" => "seo", 'seo' => 'seo',
"prototype" => "prototype", 'prototype' => 'prototype',
"creative-process" => "creative-process", 'creative-process' => 'creative-process',
"growth" => "growth", 'growth' => 'growth',
"technical-support" => "technical-support", 'technical-support' => 'technical-support',
"technology" => "technology", 'technology' => 'technology',
"solution-1" => "solution-1", 'solution-1' => 'solution-1',
"creative-tools" => "creative-tools", 'creative-tools' => 'creative-tools',
"data-science" => "data-science", 'data-science' => 'data-science',
"costumer" => "costumer", 'costumer' => 'costumer',
"cooperation" => "cooperation", 'cooperation' => 'cooperation',
"next" => "next", 'next' => 'next',
"back" => "back", 'back' => 'back',
"brand" => "brand", 'brand' => 'brand',
"right-arrows" => "right-arrows", 'right-arrows' => 'right-arrows',
"idea" => "idea", 'idea' => 'idea',
"design-thinking" => "design-thinking", 'design-thinking' => 'design-thinking',
"check" => "check", 'check' => 'check',
"cross" => "cross", 'cross' => 'cross',
"right" => "right", 'right' => 'right',
"link" => "link", 'link' => 'link',
"server" => "server", 'server' => 'server',
"analysis" => "analysis", 'analysis' => 'analysis',
"support" => "support", 'support' => 'support',
"project-management" => "project-management", 'project-management' => 'project-management',
"networking" => "networking", 'networking' => 'networking',
"team" => "team", 'team' => 'team',
"check-mark" => "check-mark", 'check-mark' => 'check-mark',
"consultation" => "consultation", 'consultation' => 'consultation',
"solution" => "solution", 'solution' => 'solution',
"success" => "success", 'success' => 'success',
"customer-review" => "customer-review", 'customer-review' => 'customer-review',
"select" => "select", 'select' => 'select',
"statistics" => "statistics", 'statistics' => 'statistics',
"machine-learning" => "machine-learning", 'machine-learning' => 'machine-learning',
"vector" => "vector", 'vector' => 'vector',
"trophy" => "trophy", 'trophy' => 'trophy',
"data" => "data", 'data' => 'data',
"clock" => "clock", 'clock' => 'clock',
"cancel" => "cancel", 'cancel' => 'cancel',
"customer-service" => "customer-service", 'customer-service' => 'customer-service',
"digital-marketing" => "digital-marketing", 'digital-marketing' => 'digital-marketing',
"email" => "email", 'email' => 'email',
"stats" => "stats", 'stats' => 'stats',
"menu" => "menu", 'menu' => 'menu',
"location" => "location", 'location' => 'location',
"tick" => "tick", 'tick' => 'tick',
"left-arrow" => "left-arrow", 'left-arrow' => 'left-arrow',
"dots-menu" => "dots-menu", 'dots-menu' => 'dots-menu',
]; ];
} }
+1 -1
View File
@@ -3,12 +3,12 @@
namespace App\Filament\Pages; namespace App\Filament\Pages;
use App\Settings\SuccessSettings; use App\Settings\SuccessSettings;
use Filament\Forms\Components\FileUpload;
use Filament\Forms\Components\Grid; use Filament\Forms\Components\Grid;
use Filament\Forms\Components\Repeater; use Filament\Forms\Components\Repeater;
use Filament\Forms\Components\Section; use Filament\Forms\Components\Section;
use Filament\Forms\Components\Textarea; use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput; use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\FileUpload;
use Filament\Forms\Form; use Filament\Forms\Form;
use Filament\Pages\SettingsPage; use Filament\Pages\SettingsPage;
use Illuminate\Contracts\Support\Htmlable; use Illuminate\Contracts\Support\Htmlable;
@@ -3,7 +3,6 @@
namespace App\Filament\Resources; namespace App\Filament\Resources;
use App\Filament\Resources\CommentResource\Pages; use App\Filament\Resources\CommentResource\Pages;
use App\Filament\Resources\CommentResource\RelationManagers;
use App\Models\Comment; use App\Models\Comment;
use Filament\Forms; use Filament\Forms;
use Filament\Forms\Components\RichEditor; use Filament\Forms\Components\RichEditor;
@@ -13,8 +12,6 @@
use Filament\Resources\Resource; use Filament\Resources\Resource;
use Filament\Tables; use Filament\Tables;
use Filament\Tables\Table; use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;
class CommentResource extends Resource class CommentResource extends Resource
{ {
@@ -3,7 +3,6 @@
namespace App\Filament\Resources\CommentResource\Pages; namespace App\Filament\Resources\CommentResource\Pages;
use App\Filament\Resources\CommentResource; use App\Filament\Resources\CommentResource;
use Filament\Actions;
use Filament\Resources\Pages\CreateRecord; use Filament\Resources\Pages\CreateRecord;
class CreateComment extends CreateRecord class CreateComment extends CreateRecord
+1 -1
View File
@@ -3,6 +3,7 @@
namespace App\Filament\Resources; namespace App\Filament\Resources;
use App\Filament\Resources\NewsResource\Pages; use App\Filament\Resources\NewsResource\Pages;
use App\Filament\Resources\NewsResource\RelationManagers\CommentsRelationManager;
use App\Models\News; use App\Models\News;
use Filament\Forms; use Filament\Forms;
use Filament\Forms\Components\DateTimePicker; use Filament\Forms\Components\DateTimePicker;
@@ -15,7 +16,6 @@
use Filament\Tables\Columns\ImageColumn; use Filament\Tables\Columns\ImageColumn;
use Filament\Tables\Table; use Filament\Tables\Table;
use Illuminate\Support\Str; use Illuminate\Support\Str;
use App\Filament\Resources\NewsResource\RelationManagers\CommentsRelationManager;
class NewsResource extends Resource class NewsResource extends Resource
{ {
@@ -2,7 +2,6 @@
namespace App\Filament\Resources\NewsResource\RelationManagers; namespace App\Filament\Resources\NewsResource\RelationManagers;
use Filament\Forms;
use Filament\Forms\Components\RichEditor; use Filament\Forms\Components\RichEditor;
use Filament\Forms\Components\TextInput; use Filament\Forms\Components\TextInput;
use Filament\Forms\Form; use Filament\Forms\Form;
@@ -61,4 +60,4 @@ public function table(Table $table): Table
]), ]),
]); ]);
} }
} }
+5 -5
View File
@@ -3,15 +3,13 @@
namespace App\Filament\Resources; namespace App\Filament\Resources;
use App\Filament\Resources\SolutionResource\Pages; use App\Filament\Resources\SolutionResource\Pages;
use App\Filament\Resources\SolutionResource\RelationManagers;
use App\Models\Solution; use App\Models\Solution;
use Filament\Forms; use Filament\Forms;
use Filament\Forms\Form; use Filament\Forms\Form;
use Filament\Resources\Resource; use Filament\Resources\Resource;
use Filament\Tables; use Filament\Tables;
use Filament\Tables\Table; use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Builder; use Illuminate\Support\Str;
use Illuminate\Database\Eloquent\SoftDeletingScope;
class SolutionResource extends Resource class SolutionResource extends Resource
{ {
@@ -27,7 +25,9 @@ public static function form(Form $form): Form
->schema([ ->schema([
Forms\Components\TextInput::make('title') Forms\Components\TextInput::make('title')
->required() ->required()
->maxLength(255), ->maxLength(255)
->reactive()
->afterStateUpdated(fn (string $operation, $state, Forms\Set $set) => $operation === 'create' ? $set('slug', Str::slug($state)) : null),
Forms\Components\TextInput::make('slug') Forms\Components\TextInput::make('slug')
->required() ->required()
->maxLength(255), ->maxLength(255),
@@ -82,4 +82,4 @@ public static function getPages(): array
'edit' => Pages\EditSolution::route('/{record}/edit'), 'edit' => Pages\EditSolution::route('/{record}/edit'),
]; ];
} }
} }
@@ -3,10 +3,9 @@
namespace App\Filament\Resources\SolutionResource\Pages; namespace App\Filament\Resources\SolutionResource\Pages;
use App\Filament\Resources\SolutionResource; use App\Filament\Resources\SolutionResource;
use Filament\Actions;
use Filament\Resources\Pages\CreateRecord; use Filament\Resources\Pages\CreateRecord;
class CreateSolution extends CreateRecord class CreateSolution extends CreateRecord
{ {
protected static string $resource = SolutionResource::class; protected static string $resource = SolutionResource::class;
} }
@@ -16,4 +16,4 @@ protected function getHeaderActions(): array
Actions\DeleteAction::make(), Actions\DeleteAction::make(),
]; ];
} }
} }
@@ -16,4 +16,4 @@ protected function getHeaderActions(): array
Actions\CreateAction::make(), Actions\CreateAction::make(),
]; ];
} }
} }
@@ -3,7 +3,6 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Models\News; use App\Models\News;
use App\Models\Comment;
use Illuminate\Http\Request; use Illuminate\Http\Request;
class NewsPageController extends Controller class NewsPageController extends Controller
+1 -1
View File
@@ -2,9 +2,9 @@
namespace App\Models; namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Comment extends Model class Comment extends Model
{ {
@@ -2,6 +2,8 @@
namespace App\Providers\Filament; namespace App\Providers\Filament;
use App\Filament\Pages\HomePageSettings;
use App\Filament\Pages\ManageCtaSettings;
use Filament\Http\Middleware\Authenticate; use Filament\Http\Middleware\Authenticate;
use Filament\Http\Middleware\DisableBladeIconComponents; use Filament\Http\Middleware\DisableBladeIconComponents;
use Filament\Http\Middleware\DispatchServingFilamentEvent; use Filament\Http\Middleware\DispatchServingFilamentEvent;
@@ -17,8 +19,6 @@
use Illuminate\Session\Middleware\AuthenticateSession; use Illuminate\Session\Middleware\AuthenticateSession;
use Illuminate\Session\Middleware\StartSession; use Illuminate\Session\Middleware\StartSession;
use Illuminate\View\Middleware\ShareErrorsFromSession; use Illuminate\View\Middleware\ShareErrorsFromSession;
use App\Filament\Pages\HomePageSettings;
use App\Filament\Pages\ManageCtaSettings;
class PanelPanelProvider extends PanelProvider class PanelPanelProvider extends PanelProvider
{ {
+4 -1
View File
@@ -7,12 +7,15 @@
class CtaSettings extends Settings class CtaSettings extends Settings
{ {
public string $title; public string $title;
public string $button_text; public string $button_text;
public string $button_url; public string $button_url;
public string $background_image; public string $background_image;
public static function group(): string public static function group(): string
{ {
return 'cta'; return 'cta';
} }
} }
+3 -2
View File
@@ -13,12 +13,13 @@ class NewsFactory extends Factory
public function definition() public function definition()
{ {
$title = $this->faker->sentence(6); $title = $this->faker->sentence(6);
return [ return [
'title' => $title, 'title' => $title,
'slug' => Str::slug($title), 'slug' => Str::slug($title),
'content' => $this->faker->paragraphs(3, true), 'content' => $this->faker->paragraphs(3, true),
'image' => 'news/' . $this->faker->image('public/storage/news', 640, 480, null, false), 'image' => 'news/'.$this->faker->image('public/storage/news', 640, 480, null, false),
'published_at' => $this->faker->dateTimeBetween('-1 year', 'now'), 'published_at' => $this->faker->dateTimeBetween('-1 year', 'now'),
]; ];
} }
} }
+2 -3
View File
@@ -2,9 +2,8 @@
namespace Database\Seeders; namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use App\Models\News; use App\Models\News;
use Illuminate\Database\Seeder;
class NewsTableSeeder extends Seeder class NewsTableSeeder extends Seeder
{ {
@@ -17,4 +16,4 @@ public function run(): void
'image' => '/web/assets/img/page/breadcrumb.jpg', 'image' => '/web/assets/img/page/breadcrumb.jpg',
]); ]);
} }
} }