Integrate dynamic settings into About page: update content sections to utilize AboutSettings for titles, subtitles, paragraphs, and media sources, enhancing content management and user experience.

This commit is contained in:
2025-07-29 14:16:10 +05:00
parent 8e770941fa
commit 76397637f0
5 changed files with 534 additions and 278 deletions

View File

@@ -9,8 +9,8 @@ return new class extends SettingsMigration
$this->migrator->add('contact.contact_subtitle', 'Default Contact Subtitle');
$this->migrator->add('contact.contact_header', 'Default Contact Header');
$this->migrator->add('contact.contact_paragraph', 'This is a default paragraph for the contact page. Please update it from the Filament panel.');
$this->migrator->add('contact.phone_number', '+1234567890');
$this->migrator->add('contact.email_address', 'info@example.com');
$this->migrator->add('contact.phone_number', '+1234567890');
$this->migrator->add('contact.location_address', '123 Main St, Anytown, USA');
$this->migrator->add('contact.map_embed_url', '');
}

View File

@@ -0,0 +1,82 @@
<?php
use Spatie\LaravelSettings\Migrations\SettingsMigration;
return new class extends SettingsMigration
{
public function up(): void
{
$this->migrator->add('cms_aboutpage.our_story_title', 'Our Story');
$this->migrator->add('cms_aboutpage.our_story_subtitle', 'A journey of passion, innovation, and dedication that shaped who we are today.');
$this->migrator->add('cms_aboutpage.our_story_paragraph_one', 'Founded in 2015, our company began with a simple mission: to revolutionize how businesses approach their challenges. What started as a small team of three passionate individuals has grown into a global organization serving clients across multiple industries.');
$this->migrator->add('cms_aboutpage.our_story_paragraph_two', 'Through years of dedication and innovation, we\'ve established ourselves as industry leaders, known for our commitment to excellence and customer satisfaction.');
$this->migrator->add('cms_aboutpage.our_story_paragraph_three', 'Today, we\'re proud to have a diverse team of experts working together to deliver exceptional solutions that make a real difference for our clients.');
$this->migrator->add('cms_aboutpage.our_story_button_text', 'Learn more about our journey');
$this->migrator->add('cms_aboutpage.our_story_button_url', '#');
$this->migrator->add('cms_aboutpage.our_story_video_poster', 'placeholder.svg'); // Placeholder, change as needed
$this->migrator->add('cms_aboutpage.our_story_video_source', '#'); // Placeholder, change as needed
$this->migrator->add('cms_aboutpage.our_journey_title', 'Our Journey');
$this->migrator->add('cms_aboutpage.our_journey_subtitle', 'Explore our company\'s history and milestones through the years. Click on any date to learn more about our journey.');
$this->migrator->add('cms_aboutpage.our_journey_milestones', [
['year' => 2010, 'title' => 'Start Company', 'description' => 'Launching a new company is an exciting journey that requires careful planning and execution. Let\'s begin!', 'image' => 'portfolio/portfolio-2.jpg'],
['year' => 2014, 'title' => 'Opening Office', 'description' => 'Opening a new office represents growth and opportunity. Join us as we expand our operations!', 'image' => 'portfolio/portfolio-3.jpg'],
['year' => 2018, 'title' => 'Project Management', 'description' => 'Effective project management ensures timely delivery and quality results. Our expert team is here to help!', 'image' => 'portfolio/portfolio-5.jpg'],
['year' => 2021, 'title' => 'Open Research Team', 'description' => 'Our open research team is dedicated to innovation and collaboration, driving impactful solutions for clients.', 'image' => 'portfolio/portfolio-8.jpg'],
['year' => 2024, 'title' => 'Winning Award', 'description' => 'Winning awards showcases our commitment to excellence and innovation. Thank you for believing', 'image' => 'portfolio/portfolio-6.jpg'],
]);
$this->migrator->add('cms_aboutpage.company_structure_title', 'Company Structure');
$this->migrator->add('cms_aboutpage.company_structure_subtitle', 'Our organizational hierarchy designed for efficiency');
$this->migrator->add('cms_aboutpage.company_structure_director_name', 'John Smith');
$this->migrator->add('cms_aboutpage.company_structure_advisor_name', 'Sarah Johnson');
$this->migrator->add('cms_aboutpage.company_structure_departments', [
['name' => 'HSE', 'person' => 'Michael Brown'],
['name' => 'Personnel', 'person' => 'Emily Davis'],
['name' => 'Operations', 'person' => 'Robert Wilson'],
['name' => 'Finance', 'person' => 'Jennifer Lee'],
]);
$this->migrator->add('cms_aboutpage.our_management_title', 'Our Management');
$this->migrator->add('cms_aboutpage.our_management_subtitle', 'Meet the leadership team driving our vision forward');
$this->migrator->add('cms_aboutpage.our_management_team', [
['name' => 'John Smith', 'title' => 'Chief Executive Officer', 'description' => 'With over 20 years of industry experience, John leads our company with vision and strategic insight.', 'image' => 'placeholder.svg'],
['name' => 'Sarah Johnson', 'title' => 'Chief Technical Officer', 'description' => 'Sarah brings technical excellence and innovation to every aspect of our products and services.', 'image' => 'placeholder.svg'],
['name' => 'Michael Brown', 'title' => 'Head of Operations', 'description' => 'Michael ensures smooth operation across all our facilities and project deployments.', 'image' => 'placeholder.svg'],
]);
$this->migrator->add('cms_aboutpage.our_facilities_title', 'Our Facilities');
$this->migrator->add('cms_aboutpage.our_facilities_subtitle', 'State-of-the-art locations where innovation happens');
$this->migrator->add('cms_aboutpage.our_facilities_locations', [
['name' => 'Headquarters', 'location' => 'San Francisco, California', 'description' => 'Our global headquarters houses our executive team and primary R&D facilities with state-of-the-art equipment and collaborative spaces.', 'image' => 'placeholder.svg', 'tags' => ['R&D Labs', 'Executive Offices', 'Conference Center', 'Innovation Hub']],
['name' => 'Manufacturing Center', 'location' => 'Austin, Texas', 'description' => 'Our primary manufacturing facility implements cutting-edge production techniques with a focus on sustainability and efficiency.', 'image' => 'placeholder.svg', 'tags' => ['Production Lines', 'Quality Control', 'Warehouse', 'Distribution Center']],
]);
}
public function down(): void
{
$this->migrator->delete('cms_aboutpage.our_story_title');
$this->migrator->delete('cms_aboutpage.our_story_subtitle');
$this->migrator->delete('cms_aboutpage.our_story_paragraph_one');
$this->migrator->delete('cms_aboutpage.our_story_paragraph_two');
$this->migrator->delete('cms_aboutpage.our_story_paragraph_three');
$this->migrator->delete('cms_aboutpage.our_story_button_text');
$this->migrator->delete('cms_aboutpage.our_story_button_url');
$this->migrator->delete('cms_aboutpage.our_story_video_poster');
$this->migrator->delete('cms_aboutpage.our_story_video_source');
$this->migrator->delete('cms_aboutpage.our_journey_title');
$this->migrator->delete('cms_aboutpage.our_journey_subtitle');
$this->migrator->delete('cms_aboutpage.our_journey_milestones');
$this->migrator->delete('cms_aboutpage.company_structure_title');
$this->migrator->delete('cms_aboutpage.company_structure_subtitle');
$this->migrator->delete('cms_aboutpage.company_structure_director_name');
$this->migrator->delete('cms_aboutpage.company_structure_advisor_name');
$this->migrator->delete('cms_aboutpage.company_structure_departments');
$this->migrator->delete('cms_aboutpage.our_management_title');
$this->migrator->delete('cms_aboutpage.our_management_subtitle');
$this->migrator->delete('cms_aboutpage.our_management_team');
$this->migrator->delete('cms_aboutpage.our_facilities_title');
$this->migrator->delete('cms_aboutpage.our_facilities_subtitle');
$this->migrator->delete('cms_aboutpage.our_facilities_locations');
}
};