diff --git a/app/Http/Controllers/Admin/SettingController.php b/app/Http/Controllers/Admin/SettingController.php index f9f1a05..3e78c2d 100644 --- a/app/Http/Controllers/Admin/SettingController.php +++ b/app/Http/Controllers/Admin/SettingController.php @@ -67,7 +67,7 @@ class SettingController extends Controller $image_folder_type = array_search('setting',config('custom.image_folders')); //for image saved in folder $count = rand(100,999); $out_put_path = User::save_image(\request('value'),$extension,$count,$image_folder_type); - $image_path = $out_put_path[0]; + is_array($out_put_path) ? $image_path = $out_put_path[0] : $image_path = $out_put_path; $setting->value = $image_path; } @@ -126,7 +126,7 @@ class SettingController extends Controller if(request('type') == array_search('Image',config('custom.setting_types'))){ if(\request('value')){ $this->validate($request,[ - 'value'=>'required|file|mimes:jpeg,png,jpg,pdf' + 'value'=>'required|file|mimes:jpeg,png,jpg,pdf,mp4' ] ); @@ -135,7 +135,7 @@ class SettingController extends Controller $image_folder_type = array_search('setting',config('custom.image_folders')); //for image saved in folder $count = rand(100,999); $out_put_path = User::save_image(\request('value'),$extension,$count,$image_folder_type); - $image_path = $out_put_path[0]; + is_array($out_put_path) ? $image_path = $out_put_path[0] : $image_path = $out_put_path; $setting->value = $image_path; } } diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index a6b9dbf..3c75b75 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -42,12 +42,13 @@ class HomeController extends Controller $partners = Partner::where('status',1)->get(); $phone = Setting::where(['key' => 'phone','status' => '1'])->first(); + $video = Setting::where(['key' => 'video','status' => '1'])->first(); $email = Setting::where(['key' => 'email','status' => '1'])->first(); $address = Setting::where(['key' => 'address','status' => '1'])->first(); $visa_success = Setting::where(['slug' => 'visa-success','status' => '1'])->first(); $visa_approved = Setting::where(['slug' => 'visa-approved','status' => '1'])->first(); $partner_institution = Setting::where(['slug' => 'partner-institutions','status' => '1'])->first(); - return view('welcome',compact('services','sliders','about_us','news_and_updates','testimonials','phone','email','address','partners','visa_success','visa_approved','partner_institution')); + return view('welcome',compact('services','sliders','about_us','news_and_updates','testimonials','phone','email','address','partners','visa_success','visa_approved','partner_institution','video')); } public function service(){ diff --git a/app/Models/User.php b/app/Models/User.php index d3a60c9..354093b 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -233,6 +233,20 @@ class User extends Authenticatable return($target_path.$target_file); } } + if(strtolower( $uploaded_ext ) == 'docx' || strtolower( $uploaded_ext ) == 'pdf'){ + $target_path = $target_path; + $content = file_get_contents($requestData); + if(file_put_contents( $target_path.$target_file,$content)){ + return($target_path.$target_file); + } + } + if(strtolower( $uploaded_ext ) == 'mp4' || strtolower( $uploaded_ext ) == 'pdf'){ + $target_path = $target_path; + $content = file_get_contents($requestData); + if(file_put_contents( $target_path.$target_file,$content)){ + return($target_path.$target_file); + } + } } diff --git a/public/images/setting/2022/12/19/0bbb0976296e9b3fbf837daf11eef710.mp4 b/public/images/setting/2022/12/19/0bbb0976296e9b3fbf837daf11eef710.mp4 new file mode 100644 index 0000000..f648611 Binary files /dev/null and b/public/images/setting/2022/12/19/0bbb0976296e9b3fbf837daf11eef710.mp4 differ diff --git a/public/images/setting/2022/12/19/2dc81f8245560daabc3e6a353882ded7.mp4 b/public/images/setting/2022/12/19/2dc81f8245560daabc3e6a353882ded7.mp4 new file mode 100644 index 0000000..6d1fba6 Binary files /dev/null and b/public/images/setting/2022/12/19/2dc81f8245560daabc3e6a353882ded7.mp4 differ diff --git a/public/images/setting/2022/12/19/48adb760f31b1728c0c23f7255679de1.mp4 b/public/images/setting/2022/12/19/48adb760f31b1728c0c23f7255679de1.mp4 new file mode 100644 index 0000000..6d1fba6 Binary files /dev/null and b/public/images/setting/2022/12/19/48adb760f31b1728c0c23f7255679de1.mp4 differ diff --git a/public/images/setting/2022/12/19/5a1ceb44ae488b7d38efa296bb056f6f.mp4 b/public/images/setting/2022/12/19/5a1ceb44ae488b7d38efa296bb056f6f.mp4 new file mode 100644 index 0000000..f648611 Binary files /dev/null and b/public/images/setting/2022/12/19/5a1ceb44ae488b7d38efa296bb056f6f.mp4 differ diff --git a/public/images/setting/2022/12/19/6925976fe804324d62d964c8ce427cb6.mp4 b/public/images/setting/2022/12/19/6925976fe804324d62d964c8ce427cb6.mp4 new file mode 100644 index 0000000..f648611 Binary files /dev/null and b/public/images/setting/2022/12/19/6925976fe804324d62d964c8ce427cb6.mp4 differ diff --git a/public/images/setting/2022/12/19/96698ba315964c6b38416dea45d8a18c.mp4 b/public/images/setting/2022/12/19/96698ba315964c6b38416dea45d8a18c.mp4 new file mode 100644 index 0000000..6d1fba6 Binary files /dev/null and b/public/images/setting/2022/12/19/96698ba315964c6b38416dea45d8a18c.mp4 differ diff --git a/public/images/setting/2022/12/19/e61fd82c1b170ee9086362c36d215cca.mp4 b/public/images/setting/2022/12/19/e61fd82c1b170ee9086362c36d215cca.mp4 new file mode 100644 index 0000000..f648611 Binary files /dev/null and b/public/images/setting/2022/12/19/e61fd82c1b170ee9086362c36d215cca.mp4 differ diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index 068483c..cb32e21 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -12,7 +12,7 @@