Server IP : 108.163.255.210 / Your IP : 18.116.24.238 Web Server : Apache System : Linux blossom.urlnameserver.com 3.10.0-1160.80.1.el7.x86_64 #1 SMP Tue Nov 8 15:48:59 UTC 2022 x86_64 User : ( 1172) PHP Version : 7.2.34 Disable Function : eval,escapeshellarg,proc_close,proc_get_status,proc_nice,proc_open,symlink,system,pcntl_exec,getrusage,chown,chgp,closelog,openlog,syslog,define_syslog_variables,php_ini_loaded_file,getservbyname,getservbyport,posix_getgid,posix_getgrgid,proc_terminate,pfsockopen,apache_child_terminate,posix_mkfifo,posix_setpgid,posix_setuid,hypot,pg_host,pos,posix_access,posix_getcwd,posix_getservbyname,myshellexec,getpid,posix_getsid,posix_isatty,posix_kill,posix_mknod,posix_setgid,posix_setsid,posix_setuid,posix_times,posix_uname,ps_fill,posix_getpwuid,global,ini_restore,zip_open,zip_read,rar_open,bzopen,bzread,bzwrite,apache_get_modules,apache_get_version,phpversionphpinfo,php_ini_scanned_files,get_current_user,disk_total_space,diskfreespace,leak,imap_list,hypo,filedump,safe_mode,getmygid,apache_getenv,apache_setenv,bzread,bzwrite,bzopen,phpini,higlight_file,dos_conv,get_cwd,er_log,cmd,e_name,vdir,get_dir,only_read,ftok,ftpexec,posix_getpwnam,mysql_list_dbs,disk_free_space,session_save_path,confirm_phpdoc_compiled,zip_entry_rea,php_u,psockopen,crack_opendict,crack_getlastmessage,crack_closedict,crack_check,fpassthru,posix_get_last_error,posix_getlogin,posix_getgroups,posix_strerror,posix_getrlimit,posix_getpgrp,posix_getgrnam,pos,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/unilinki/public_html/journey/app/Http/Controllers/ |
Upload File : |
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Http\Controllers\Controller; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Mail; use Exception; use App\User; use App\Policy; use App\Service; use App\Faq; use App\Blog; use App\BlogCategory; use App\BlogTag; use App\Destination; use App\Destinationplace; use App\Explore; use App\Festival; use App\Park; use App\Menu; use App\Package; use App\PackageHotel; use App\Hotel; use App\DestinationPackage; use App\Tour; use App\AllTour; use App\TourPackage; use App\Contact; class HomeController extends Controller { public function index() { $banners = Policy::where('status', '1')->orderBy(DB::raw('RAND()'))->get(); $services = Service::orderBy('id', 'desc')->get(); $faqs = Faq::get(); $tours = Tour::where('status', '1')->orderBy('id', 'desc')->limit(4)->get(); $destinationplaces = Destinationplace::where('status', '1')->orderBy('id', 'desc')->limit(6)->get(); $blogs = Blog::where('status', '1')->orderBy('id', 'desc')->limit(4)->get(); return view('front.pages.index')->with(['title'=>'Home Page', 'banners'=>$banners, 'services'=>$services, 'faqs'=>$faqs, 'tours'=>$tours, 'destinationplaces'=>$destinationplaces, 'blogs'=>$blogs]); } public function destinationsubpage($id) { $destinationplaces = Destinationplace::where('id', $id)->where('status', '1')->orderBy('id', 'desc')->first(); $packages = Package::where('status', '1')->orderBy('id', 'desc')->get(); $hotels = Hotel::where('status', '1')->orderBy('id', 'desc')->get(); $destinationpackages = DestinationPackage::where('status', '1')->orderBy('id', 'desc')->get(); $package_hotels = PackageHotel::where('status', '1')->orderBy('id', 'desc')->get(); return view('front.pages.destination-sub-page')->with(['title'=>'Destination Sub Page', 'destinationplaces'=>$destinationplaces, 'packages'=>$packages, 'hotels'=>$hotels, 'destinationpackages'=>$destinationpackages, 'package_hotels'=>$package_hotels]); } public function about() { return view('front.pages.about')->with(['title'=>'About Page']); } public function faq() { $faqs = Faq::get(); return view('front.pages.faq')->with(['title'=>'Faq Page', 'faqs'=>$faqs]); } public function blog() { $blogs = Blog::get(); $blog_cat = BlogCategory::get(); $blog_tag = BlogTag::get(); return view('front.pages.blog')->with(['title'=>'Blog Page', 'blogs'=>$blogs, 'blog_cat'=>$blog_cat, 'blog_tag'=>$blog_tag]); } public function contact() { $countries = DB::table('countries')->get(); return view('front.pages.contact')->with(['title'=>'Contact Page', 'countries'=>$countries]); } public function destinationadventure($id) { $destinations = Destination::where('id', $id)->first(); $destinationplaces = Destinationplace::where('status', '1')->where('destination', $id.'destination')->orderBy('id', 'desc')->get(); return view('front.pages.destination-adventure')->with(['title'=>'Adventure Page', 'destinationplaces'=>$destinationplaces, 'destinations'=>$destinations]); } public function exploreadventure($id) { $explores = Explore::where('id', $id)->first(); $exploreplaces = Destinationplace::where('status', '1')->where('destination', $id.'explore')->orderBy('id', 'desc')->get(); return view('front.pages.explore-adventure')->with(['title'=>'Adventure Page', 'exploreplaces'=>$exploreplaces, 'explores'=>$explores]); } public function festivaladventure($id) { $festivals = Festival::where('id', $id)->first(); $festivalplaces = Destinationplace::where('status', '1')->where('destination', $id.'festival')->orderBy('id', 'desc')->get(); return view('front.pages.festival-adventure')->with(['title'=>'Adventure Page', 'festivalplaces'=>$festivalplaces, 'festivals'=>$festivals]); } public function parkadventure($id) { $parks = Park::where('id', $id)->first(); $parkplaces = Destinationplace::where('status', '1')->where('destination', $id.'park')->orderBy('id', 'desc')->get(); return view('front.pages.park-adventure')->with(['title'=>'Adventure Page', 'parkplaces'=>$parkplaces, 'parks'=>$parks]); } public function goodtoknow() { return view('front.pages.good-to-know')->with(['title'=>'Good To Know Page']); } public function destinationparent() { return view('front.pages.destination-parent')->with(['title'=>'Destination Parent Page']); } public function directorycategory() { return view('front.pages.directory-category')->with(['title'=>'Directory Category Page']); } public function singlehero($id) { $singleblogs = Blog::where('status', '1')->where('id', $id)->first(); $blogs = Blog::where('status', '1')->where('id', '!=', $id)->get(); return view('front.pages.single-hero')->with(['title'=>'Single Hero Page', 'singleblogs'=>$singleblogs, 'blogs'=>$blogs]); } public function exploretour() { $content = Tour::where('status', '1')->orderBy('id', 'desc')->get(); return view('front.pages.explore-tour')->with(['title'=>'Explore Tour Page', 'content'=>$content]); } public function culturetour($id) { $tours = Tour::where('id', $id)->where('status', '1')->orderBy('id', 'desc')->first(); $alltours = AllTour::where('status', '1')->orderBy('id', 'desc')->get(); $packages = TourPackage::where('status', '1')->orderBy('id', 'desc')->get(); return view('front.pages.culture-tour')->with(['title'=>'Culture Tour Page', 'tours'=>$tours, 'alltours'=>$alltours, 'packages'=>$packages]); } public function destinations() { $content = Destination::where('status', '1')->orderBy('id', 'desc')->get(); return view('front.pages.destinations')->with(['title'=>'Destinations Page', 'content'=>$content]); } public function explores() { $content = Explore::where('status', '1')->orderBy('id', 'desc')->get(); return view('front.pages.explores')->with(['title'=>'Explores Page', 'content'=>$content]); } public function festivals() { $destinationplaces = Destinationplace::orderBy('id', 'desc')->where('status', '1')->get(); $festivals = Festival::orderBy('id', 'desc')->where('status', '1')->get(); $new_festival = 'festival'; return view('front.pages.festivals')->with(['title'=>'Festivals Page', 'destinationplaces'=>$destinationplaces, 'festivals'=>$festivals, 'new_festival'=>$new_festival]); } public function parks() { $content = Park::where('status', '1')->orderBy('id', 'desc')->get(); return view('front.pages.parks')->with(['title'=>'Parks Page', 'content'=>$content]); } public function guidesingle($id) { $destinationplaces = Destinationplace::where('id', $id)->where('status', '1')->orderBy('id', 'desc')->first(); return view('front.pages.guide-single')->with(['title'=>'Guide Single Page', 'destinationplaces'=>$destinationplaces]); } public function directorysingle() { return view('front.pages.directory-single')->with(['title'=>'Directory Single Page']); } public function detail($id) { $packages = Package::where('id', $id)->where('status', '1')->orderBy('id', 'desc')->first(); $package_hotels = PackageHotel::where('status', '1')->orderBy('id', 'desc')->get(); $hotels = Hotel::where('status', '1')->orderBy('id', 'desc')->get(); return view('front.pages.detail')->with(['title'=>'Detail Page', 'packages'=>$packages, 'hotels'=>$hotels, 'package_hotels'=>$package_hotels]); } public function contactForm(Request $request) { try { $rs = Contact::create([ 'name' =>$request->input('name'), 'email' => $request->input('email'), 'contact' => $request->input('contact'), 'country' => $request->input('country'), 'adult' => $request->input('adult'), 'child' => $request->input('child'), 'duration' => $request->input('duration'), 'hotel' => $request->input('hotel'), 'message' => $request->input('message'), 'status' => 0 ]); $country_code = DB::table('countries')->where('id', $request->country)->first(); if($rs) { # Send OTP in email after successful registration $data = array(); $data['name'] = $request->input('name'); $data['email'] = $request->input('email'); $data['contact'] = $request->input('contact'); $data['country'] = $country_code->name; $data['phone_code'] = $country_code->phone_code; $data['adult'] = $request->input('adult'); $data['child'] = $request->input('child'); $data['duration'] = $request->input('duration'); $data['hotel'] = $request->input('hotel'); $data['message_new'] = $request->input('message'); $data['ip_address'] = $request->ip(); Mail::send('mail.support', $data, function ($message) use ($data) { $message->to($data['email']); $message->from('noreply@indijourneys.com', 'Indijourneys'); $message->subject('Thank You for Contacting Us'); }); Mail::send('mail.supportadmin', $data, function ($message) use ($data) { $message->to('noreply@indijourneys.com'); $message->to('indijourneys@gmail.com'); $message->from($data['email'], $data['name']); $message->subject('New Enquiry on Indijourneys'); }); $message = array('flag'=>'alert-success', 'message'=>'Mail sent Successfully'); return redirect()->back()->with(['message'=>$message]); } $message = array('flag'=>'alert-danger', 'message'=>'Unable to send mail, Please try again'); return back()->with(['message'=>$message]); } catch (Exception $e) { $message = array('flag'=>'alert-danger', 'message'=>$e->getMessage()); return back()->with(['message'=>$message]); } } }