Add solutions image upload field and update settings: introduce a file upload component for solutions images in ManageSolutions, add solutions_image property to SolutionSettings, and update related database migrations and views to support dynamic image display.
This commit is contained in:
24
database/factories/NewsFactory.php
Normal file
24
database/factories/NewsFactory.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\News;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class NewsFactory extends Factory
|
||||
{
|
||||
protected $model = News::class;
|
||||
|
||||
public function definition()
|
||||
{
|
||||
$title = $this->faker->sentence(6);
|
||||
return [
|
||||
'title' => $title,
|
||||
'slug' => Str::slug($title),
|
||||
'content' => $this->faker->paragraphs(3, true),
|
||||
'image' => 'news/' . $this->faker->image('public/storage/news', 640, 480, null, false),
|
||||
'published_at' => $this->faker->dateTimeBetween('-1 year', 'now'),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ class DatabaseSeeder extends Seeder
|
||||
$this->call([
|
||||
UsersTableSeeder::class,
|
||||
BrandTableSeeder::class,
|
||||
NewsTableSeeder::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
18
database/seeders/NewsTableSeeder.php
Normal file
18
database/seeders/NewsTableSeeder.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Models\News;
|
||||
|
||||
class NewsTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
News::factory()->count(20)->create();
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ return new class extends SettingsMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
$this->migrator->add('cms_homepage.bg_video', 'http://127.0.0.1:8000/web/assets/video/banner.mp4');
|
||||
$this->migrator->add('cms_homepage.bg_video', 'http://192.168.1.180:8000/web/assets/video/banner.mp4');
|
||||
$this->migrator->add('cms_homepage.hero_badge_text', 'Expert Solutions');
|
||||
$this->migrator->add('cms_homepage.hero_header', 'Shaping Future');
|
||||
$this->migrator->add('cms_homepage.hero_sub_header', 'Architecture');
|
||||
@@ -24,7 +24,7 @@ return new class extends SettingsMigration
|
||||
$this->migrator->add('cms_homepage.about_reviews_text', 'Client Reviews');
|
||||
$this->migrator->add('cms_homepage.about_button_text', 'Our Story');
|
||||
$this->migrator->add('cms_homepage.about_button_url', 'http://gujurly.com');
|
||||
$this->migrator->add('cms_homepage.about_image_one', 'http://127.0.0.1:8000/web/assets/img/about/about-5.jpg');
|
||||
$this->migrator->add('cms_homepage.about_image_two', 'http://127.0.0.1:8000/web/assets/img/about/about-6.jpg');
|
||||
$this->migrator->add('cms_homepage.about_image_one', 'http://192.168.1.180:8000/web/assets/img/about/about-5.jpg');
|
||||
$this->migrator->add('cms_homepage.about_image_two', 'http://192.168.1.180:8000/web/assets/img/about/about-6.jpg');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -9,6 +9,7 @@ return new class extends SettingsMigration
|
||||
$this->migrator->add('cms_solutions.solutions_subtitle', 'Our Services');
|
||||
$this->migrator->add('cms_solutions.solutions_header', 'Provide Quality Services');
|
||||
$this->migrator->add('cms_solutions.solutions_button_text', 'more Services');
|
||||
$this->migrator->add('cms_solutions.solutions_image', 'http://192.168.1.180:8000/web/assets/img/page/services.jpg');
|
||||
$this->migrator->add('cms_solutions.solutions_button_url', 'services.html');
|
||||
$this->migrator->add('cms_solutions.solution_items', [
|
||||
['icon_class' => 'flaticon-it-department', 'title' => 'Flooring Installation', 'link' => '#'],
|
||||
|
||||
@@ -10,7 +10,7 @@ return new class extends SettingsMigration
|
||||
$this->migrator->add('cms_success.success_header', 'Building Success With Expert Advisory Services');
|
||||
$this->migrator->add('cms_success.success_paragraph', 'With a focus on innovation and sustainability, we help you navigate complex challenges, ensuring');
|
||||
$this->migrator->add('cms_success.success_button_text', 'Get Advices');
|
||||
$this->migrator->add('cms_success.success_button_url', 'contact.html');
|
||||
$this->migrator->add('cms_success.success_button_url', 'http://gujurly.com');
|
||||
$this->migrator->add('cms_success.skill_items', [
|
||||
['name' => 'Building Construction', 'percentage' => 89],
|
||||
['name' => 'Interiors Design', 'percentage' => 70],
|
||||
|
||||
Reference in New Issue
Block a user