⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.19
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Server Software:
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
id
/
hospital.dev-unit.com
/
database
/
seeders
/
View File Name :
LandingSectionTwoTableSeeder.php
<?php namespace Database\Seeders; use App\Models\SectionTwo; use Illuminate\Database\Seeder; class LandingSectionTwoTableSeeder extends Seeder { /** * Run the database seeds. */ public function run(): void { $input = [ 'text_main' => 'Protect Your Health', 'text_secondary' => 'Our medical clinic provides quality care for the entire family while maintaining a personable atmosphere best services.', 'card_one_image' => ('/front-assets/landing-theme/images/banner/appointment_schedule.png'), 'card_one_text' => 'Schedule Appointment', 'card_one_text_secondary' => 'Makes it Easy for patients to Book Appointment online from anywhere & anytime.', 'card_two_image' => ('/front-assets/landing-theme/images/banner/ipd_manage.png'), 'card_two_text' => 'OPD Management', 'card_two_text_secondary' => 'Easily Manage Appointments with one.', 'card_third_image' => ('/front-assets/landing-theme/images/banner/opd_manage.png'), 'card_third_text' => 'IPD Management', 'card_third_text_secondary' => 'This module of hospital management system is designed to manage all Inpatient department', ]; $section = SectionTwo::create($input); if (file_exists(public_path($input['card_one_image']))) { $section->addMedia(public_path($input['card_one_image'])) ->preservingOriginal() ->toMediaCollection(SectionTwo::SECTION_TWO_CARD_ONE_PATH, config('app.media_disk')); } if (file_exists(public_path($input['card_two_image']))) { $section->addMedia(public_path($input['card_two_image'])) ->preservingOriginal() ->toMediaCollection(SectionTwo::SECTION_TWO_CARD_TWO_PATH, config('app.media_disk')); } if (file_exists(public_path($input['card_third_image']))) { $section->addMedia(public_path($input['card_third_image'])) ->preservingOriginal() ->toMediaCollection(SectionTwo::SECTION_TWO_CARD_THIRD_PATH, config('app.media_disk')); } $section->update([ 'card_one_image' => $section->getFirstMediaUrl(SectionTwo::SECTION_TWO_CARD_ONE_PATH), 'card_two_image' => $section->getFirstMediaUrl(SectionTwo::SECTION_TWO_CARD_TWO_PATH), 'card_third_image' => $section->getFirstMediaUrl(SectionTwo::SECTION_TWO_CARD_THIRD_PATH), ]); } }