dynamic-video

aplus#36
Mahesh Sharma 2 years ago
parent a02f4c55ea
commit 5cdf8d2d80
  1. 6
      app/Http/Controllers/Admin/SettingController.php
  2. 3
      app/Http/Controllers/HomeController.php
  3. 14
      app/Models/User.php
  4. BIN
      public/images/setting/2022/12/19/0bbb0976296e9b3fbf837daf11eef710.mp4
  5. BIN
      public/images/setting/2022/12/19/2dc81f8245560daabc3e6a353882ded7.mp4
  6. BIN
      public/images/setting/2022/12/19/48adb760f31b1728c0c23f7255679de1.mp4
  7. BIN
      public/images/setting/2022/12/19/5a1ceb44ae488b7d38efa296bb056f6f.mp4
  8. BIN
      public/images/setting/2022/12/19/6925976fe804324d62d964c8ce427cb6.mp4
  9. BIN
      public/images/setting/2022/12/19/96698ba315964c6b38416dea45d8a18c.mp4
  10. BIN
      public/images/setting/2022/12/19/e61fd82c1b170ee9086362c36d215cca.mp4
  11. 2
      resources/views/welcome.blade.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;
}
}

@ -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(){

@ -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);
}
}
}

@ -12,7 +12,7 @@
<!-- Slider section -->
<section class="banner-section" >
<video id="vid" autoplay playsinline loop muted>
<source src="{{url('frontend/video/aplus-video.mp4')}}" type="video/mp4">
<source src="{{url($video->value)}}" type="video/mp4">
</video>
<span class="banner-shadow"></span>
<div class="banner-description">

Loading…
Cancel
Save