Refactor form components across multiple pages: enforce required validation on various text inputs and file uploads in HomePageSettings, ManagePortfolio, ManageSite, ManageSiteSocialSettings, ManageSolutions, ManageSuccess, and update the news index view to display dynamic content.
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
namespace App\Filament\Pages;
|
||||
|
||||
use App\Settings\PortfolioSettings;
|
||||
use Filament\Forms\Components\FileUpload;
|
||||
use Filament\Forms\Components\Grid;
|
||||
use Filament\Forms\Components\Repeater;
|
||||
use Filament\Forms\Components\Section;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Components\FileUpload;
|
||||
use Filament\Forms\Components\Repeater;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Pages\SettingsPage;
|
||||
use Illuminate\Contracts\Support\Htmlable;
|
||||
@@ -33,9 +33,11 @@ class ManagePortfolio extends SettingsPage
|
||||
Grid::make()->schema([
|
||||
TextInput::make('portfolio_button_text')
|
||||
->label('Button Text')
|
||||
->required()
|
||||
->maxLength(50),
|
||||
TextInput::make('portfolio_button_url')
|
||||
->label('Button URL')
|
||||
->required()
|
||||
->maxLength(255)
|
||||
->url(),
|
||||
])->columns(2),
|
||||
@@ -49,7 +51,8 @@ class ManagePortfolio extends SettingsPage
|
||||
->schema([
|
||||
FileUpload::make('image')
|
||||
->label('Image (700x525)')
|
||||
->image() ->maxSize(2048)
|
||||
->image()
|
||||
->maxSize(2048)
|
||||
->disk('public')
|
||||
->directory('portfolio-images')
|
||||
->required(),
|
||||
@@ -103,4 +106,4 @@ class ManagePortfolio extends SettingsPage
|
||||
{
|
||||
return 'Manage the portfolio section content, including items, categories, and titles.';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user