Compare commits
	
		
			1 Commits 
		
	
	
	| Author | SHA1 | Date | 
|---|---|---|
| 
							
							
								
								 | 
						12f7df0541 | 3 years ago | 
				 2476 changed files with 263 additions and 810373 deletions
			
			
		@ -1,216 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers\Admin; | 
				
			||||
 | 
				
			||||
use App\Http\Controllers\Controller; | 
				
			||||
use App\Http\Resources\SliderResource; | 
				
			||||
use App\Models\AboutUs; | 
				
			||||
use App\Models\AboutUsPoint; | 
				
			||||
use App\Models\User; | 
				
			||||
use App\Models\Setting; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
use Illuminate\Support\Facades\Session; | 
				
			||||
 | 
				
			||||
class AboutUsController extends Controller | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Display a listing of the resource. | 
				
			||||
     * | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
 | 
				
			||||
    protected $view = 'admin.about_us.'; | 
				
			||||
    protected $redirect = 'admin/about_us'; | 
				
			||||
    public function index() | 
				
			||||
    { | 
				
			||||
        $settings = AboutUs::orderBy('id','DESC'); | 
				
			||||
        // if(\request('title1')){ | 
				
			||||
        //     $key = \request('title1'); | 
				
			||||
        //     $settings = $settings->where('title1','like','%'.$key.'%'); | 
				
			||||
        // } | 
				
			||||
        // if(\request('status')){ | 
				
			||||
        //     $key = \request('status'); | 
				
			||||
        //     $settings = $settings->where('status',$key); | 
				
			||||
        // } | 
				
			||||
        $settings = $settings->paginate(config('custom.per_page')); | 
				
			||||
        return view($this->view.'index',compact('settings')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Show the form for creating a new resource. | 
				
			||||
     * | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function create() | 
				
			||||
    { | 
				
			||||
        return view($this->view.'create'); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Store a newly created resource in storage. | 
				
			||||
     * | 
				
			||||
     * @param  \Illuminate\Http\Request  $request | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function store(Request $request) | 
				
			||||
    { | 
				
			||||
        $this->validate(\request(),[ | 
				
			||||
             | 
				
			||||
             | 
				
			||||
            'description' => 'required', | 
				
			||||
            'sub_description' => 'required', | 
				
			||||
            'image' => 'required|file|mimes:jpeg,png,jpg', | 
				
			||||
            'keyword' => 'required' | 
				
			||||
        ]); | 
				
			||||
 | 
				
			||||
        $setting = new AboutUs(); | 
				
			||||
 | 
				
			||||
        $setting->description = strip_tags(\request('description')); | 
				
			||||
        $setting->sub_description = strip_tags(\request('sub_description')); | 
				
			||||
        $setting->status = \request('status'); | 
				
			||||
        $setting->title = \request('title'); | 
				
			||||
        $setting->bottom_title = \request('bottom_title'); | 
				
			||||
        $setting->keyword = \request('keyword'); | 
				
			||||
        $setting->point_title = strip_tags(\request('point_title')); | 
				
			||||
        $setting->seo_title = \request('seo_title'); | 
				
			||||
        $setting->meta_keyword = strip_tags(\request('meta_keyword')); | 
				
			||||
        $setting->seo_description = strip_tags(\request('seo_description')); | 
				
			||||
        $setting->slug = Setting::create_slug(\request('seo_title')); | 
				
			||||
        if($request->hasFile('image')){ | 
				
			||||
                $extension = \request()->file('image')->getClientOriginalExtension(); | 
				
			||||
                $image_folder_type = array_search('about_us',config('custom.image_folders')); //for image saved in folder | 
				
			||||
                $count = rand(100,999); | 
				
			||||
                $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); | 
				
			||||
                if($extension == "jpeg" || $extension == "jpg" || $extension == "png"){ | 
				
			||||
                    $image_path = $out_put_path[0]; | 
				
			||||
                    $setting->image = $image_path; | 
				
			||||
//                    $setting->doc_name = $out_put_path[2]; | 
				
			||||
                } | 
				
			||||
            } | 
				
			||||
 | 
				
			||||
                 | 
				
			||||
             | 
				
			||||
     | 
				
			||||
        if($setting->save()){ | 
				
			||||
            $points = $request->points; | 
				
			||||
                if($points[0] != null){ | 
				
			||||
                    foreach($points as $key => $point){ | 
				
			||||
         | 
				
			||||
                        $about_us_point = new   AboutUsPoint(); | 
				
			||||
                         | 
				
			||||
                        $about_us_point->about_us_id = $setting->id; | 
				
			||||
                         | 
				
			||||
                         | 
				
			||||
                        $about_us_point->point = $point; | 
				
			||||
                        $about_us_point->save(); | 
				
			||||
                    } | 
				
			||||
                } | 
				
			||||
  | 
				
			||||
            Session::flash('success','About Us has been created!'); | 
				
			||||
            return redirect($this->redirect); | 
				
			||||
        } | 
				
			||||
         | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Display the specified resource. | 
				
			||||
     * | 
				
			||||
     * @param  int  $id | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function show($id) | 
				
			||||
    { | 
				
			||||
        $about_us = AboutUs::findorfail($id); | 
				
			||||
        return view($this->view.'show',compact('about_us')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Show the form for editing the specified resource. | 
				
			||||
     * | 
				
			||||
     * @param  int  $id | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function edit($id) | 
				
			||||
    { | 
				
			||||
        $about_us = AboutUs::findorfail($id); | 
				
			||||
      return view($this->view.'edit',compact('about_us')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Update the specified resource in storage. | 
				
			||||
     * | 
				
			||||
     * @param  \Illuminate\Http\Request  $request | 
				
			||||
     * @param  int  $id | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function update(Request $request, $id) | 
				
			||||
    { | 
				
			||||
        $setting=AboutUs::findorfail($id); | 
				
			||||
 | 
				
			||||
        $this->validate(\request(),[ | 
				
			||||
            'keyword' => 'required', | 
				
			||||
            'description' => 'required', | 
				
			||||
            'image' => 'file|mimes:jpeg,png,jpg', | 
				
			||||
            'status' => 'required' | 
				
			||||
        ]); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        $setting->description = strip_tags(\request('description')); | 
				
			||||
        $setting->sub_description = strip_tags(\request('sub_description')); | 
				
			||||
        $setting->status = \request('status'); | 
				
			||||
        $setting->title = \request('title'); | 
				
			||||
        $setting->bottom_title = \request('bottom_title'); | 
				
			||||
        $setting->keyword = \request('keyword'); | 
				
			||||
        $setting->seo_title = \request('seo_title'); | 
				
			||||
        $setting->meta_keyword = strip_tags(\request('meta_keyword')); | 
				
			||||
        $setting->seo_description = strip_tags(\request('seo_description')); | 
				
			||||
        $setting->point_title = strip_tags(\request('point_title')); | 
				
			||||
        $setting->slug = Setting::create_slug(\request('seo_title')); | 
				
			||||
        if($request->hasFile('image')){ | 
				
			||||
            $extension = \request()->file('image')->getClientOriginalExtension(); | 
				
			||||
            $image_folder_type = array_search('about_us',config('custom.image_folders')); //for image saved in folder | 
				
			||||
            $count = rand(100,999); | 
				
			||||
            $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); | 
				
			||||
            $image_path = $out_put_path[0]; | 
				
			||||
            $setting->image = $image_path; | 
				
			||||
//                    $setting->doc_name = $out_put_path[2]; | 
				
			||||
        } | 
				
			||||
//        $requestData = $request->all(); | 
				
			||||
//        $setting->fill($requestData); | 
				
			||||
        if($setting->update()){ | 
				
			||||
            $points = $request->points; | 
				
			||||
          | 
				
			||||
            if((!empty($points)) && ($points[0] != null)){ | 
				
			||||
                $about_us_point = $setting->about_us_points(); | 
				
			||||
                $about_us_point->delete(); | 
				
			||||
                foreach($points as $point){ | 
				
			||||
                    $about_us_point = new AboutUsPoint(); | 
				
			||||
                    $about_us_point->about_us_id = $id; | 
				
			||||
                    $about_us_point->point = $point; | 
				
			||||
                    $about_us_point->save(); | 
				
			||||
                } | 
				
			||||
            } | 
				
			||||
            Session::flash('success','About Us has been Updated!'); | 
				
			||||
            return redirect($this->redirect); | 
				
			||||
        } | 
				
			||||
         | 
				
			||||
 } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Remove the specified resource from storage. | 
				
			||||
     * | 
				
			||||
     * @param  int  $id | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function destroy($id) | 
				
			||||
    { | 
				
			||||
        // | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function getSliders(){ | 
				
			||||
 | 
				
			||||
        $settings = Slider::where('status',1)->get(); | 
				
			||||
        return SliderResource::collection($settings); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,278 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers\Admin; | 
				
			||||
 | 
				
			||||
use App\Http\Controllers\Controller; | 
				
			||||
use App\Models\Accomodation; | 
				
			||||
use App\Models\BlogPoint; | 
				
			||||
use App\Models\NewsAndUpdatePoint; | 
				
			||||
use App\Models\Setting; | 
				
			||||
use App\Models\User; | 
				
			||||
use App\Models\AccomodationFeature; | 
				
			||||
use App\Models\AccomodationInformation; | 
				
			||||
use App\Models\AccomodationSliderTitle; | 
				
			||||
use App\Models\AccomodationImage; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
use Illuminate\Support\Facades\Auth; | 
				
			||||
use Illuminate\Support\Facades\Session; | 
				
			||||
// use function GuzzleHttp\Promise\all; | 
				
			||||
 | 
				
			||||
class AccomodationController extends Controller | 
				
			||||
{ | 
				
			||||
    protected $view = 'admin.accomodation.'; | 
				
			||||
    protected $redirect = 'admin/accomodations'; | 
				
			||||
 | 
				
			||||
    public function index() | 
				
			||||
    { | 
				
			||||
        $settings = Accomodation::orderBy('id','DESC'); | 
				
			||||
 | 
				
			||||
        if(\request('name')){ | 
				
			||||
            $key = \request('name'); | 
				
			||||
            $settings = $settings->where('title','like','%'.$key.'%'); | 
				
			||||
        } | 
				
			||||
        if(\request('status')){ | 
				
			||||
            $key = \request('status'); | 
				
			||||
            $settings = $settings->where('status',$key); | 
				
			||||
        } | 
				
			||||
        $settings = $settings->paginate(config('custom.per_page')); | 
				
			||||
        return view($this->view.'index',compact('settings')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function create() | 
				
			||||
    { | 
				
			||||
        return view($this->view . 'create'); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function store(Request $request) | 
				
			||||
    {        | 
				
			||||
         | 
				
			||||
            $this->validate(\request(), [ | 
				
			||||
                'title' => 'required', | 
				
			||||
                'phone' => 'required', | 
				
			||||
                'address' => 'required', | 
				
			||||
                'status' => 'required', | 
				
			||||
                'images' => 'required', | 
				
			||||
                'slider_image' => 'required|file|mimes:jpeg,png,jpg' | 
				
			||||
            ]); | 
				
			||||
             | 
				
			||||
        if($request->has('slider_image')){ | 
				
			||||
             | 
				
			||||
            $extension = \request()->file('slider_image')->getClientOriginalExtension(); | 
				
			||||
            $image_folder_type = array_search('accomodation',config('custom.image_folders')); //for image saved in folder | 
				
			||||
            $count = rand(100,999); | 
				
			||||
            $out_put_path = User::save_image(\request()->file('slider_image'),$extension,$count,$image_folder_type); | 
				
			||||
            $image_path1 = $out_put_path[0]; | 
				
			||||
        } | 
				
			||||
     | 
				
			||||
        $requestData = $request->all(); | 
				
			||||
        if(isset($image_path1)){ | 
				
			||||
            $requestData['slider_image'] = $image_path1; | 
				
			||||
        } | 
				
			||||
       | 
				
			||||
 | 
				
			||||
        // $requestData['slug'] = Setting::create_slug($requestData['keyword']); | 
				
			||||
        $accomodation = Accomodation::create($requestData); | 
				
			||||
 | 
				
			||||
        if($request->hasFile('images')){ | 
				
			||||
            foreach($request->file('images') as $imagefile) { | 
				
			||||
            $extension = $imagefile->getClientOriginalExtension(); | 
				
			||||
            $image_folder_type = array_search('accomodation',config('custom.image_folders')); //for image saved in folder | 
				
			||||
            $count = rand(100,999); | 
				
			||||
            $out_put_path = User::save_image($imagefile,$extension,$count,$image_folder_type); | 
				
			||||
            $image_path1 = $out_put_path[0]; | 
				
			||||
            $accomodation_image = new AccomodationImage(); | 
				
			||||
            $accomodation_image->accomodation_id = $accomodation->id; | 
				
			||||
            $accomodation_image->image = $image_path1; | 
				
			||||
            $accomodation_image->save(); | 
				
			||||
             | 
				
			||||
            } | 
				
			||||
             | 
				
			||||
        } | 
				
			||||
        if(\request('feature_name')){ | 
				
			||||
            foreach (\request('feature_name') as $index => $value){ | 
				
			||||
                $setting_point = new AccomodationFeature(); | 
				
			||||
                $setting_point->accomodation_id = $accomodation->id; | 
				
			||||
                $setting_point->feature_name = $value; | 
				
			||||
                $setting_point->save(); | 
				
			||||
            } | 
				
			||||
        } | 
				
			||||
        if(\request('information_name')){ | 
				
			||||
            foreach (\request('information_name') as $index => $value){ | 
				
			||||
                $setting_point = new AccomodationInformation(); | 
				
			||||
                $setting_point->accomodation_id = $accomodation->id; | 
				
			||||
                $setting_point->information_name = $value; | 
				
			||||
                $setting_point->save(); | 
				
			||||
            } | 
				
			||||
        } | 
				
			||||
        if(\request('title_name')){ | 
				
			||||
            foreach (\request('title_name') as $index => $value){ | 
				
			||||
                $setting_point = new AccomodationSliderTitle(); | 
				
			||||
                $setting_point->accomodation_id = $accomodation->id; | 
				
			||||
                $setting_point->title_name = $value; | 
				
			||||
                $setting_point->save(); | 
				
			||||
            } | 
				
			||||
        } | 
				
			||||
        Session::flash('success','Accomodation successfully created'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function show($id) | 
				
			||||
    { | 
				
			||||
        $setting =Accomodation::findorfail($id); | 
				
			||||
        return view($this->view.'show',compact('setting')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function edit($id){ | 
				
			||||
        $setting =Accomodation::findorfail($id); | 
				
			||||
        return view($this->view.'edit',compact('setting')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function update(Request $request, $id){ | 
				
			||||
 | 
				
			||||
//        dd(\request()->all()); | 
				
			||||
        $setting =Accomodation::findorfail($id); | 
				
			||||
            $this->validate(\request(), [ | 
				
			||||
                'title' => 'required', | 
				
			||||
                'phone' => 'required', | 
				
			||||
                'address' => 'required', | 
				
			||||
                'status' => 'required' | 
				
			||||
                // 'images' => 'required', | 
				
			||||
                // 'slider_image' => 'required|file|mimes:jpeg,png,jpg' | 
				
			||||
            ]); | 
				
			||||
 | 
				
			||||
        if(\request('slider_image')){ | 
				
			||||
            $this->validate(\request(),[ | 
				
			||||
                'image' => 'file|mimes:jpeg,png,jpg' | 
				
			||||
            ]); | 
				
			||||
            if($request->hasFile('slider_image')){ | 
				
			||||
                $extension = $request->file('slider_image')->getClientOriginalExtension(); | 
				
			||||
                $image_folder_type = array_search('accomodation',config('custom.image_folders')); //for image saved in folder | 
				
			||||
                $count = rand(100,999); | 
				
			||||
                $out_put_path = User::save_image($request->file('slider_image'),$extension,$count,$image_folder_type); | 
				
			||||
                $image_path1 = $out_put_path[0]; | 
				
			||||
                if (is_file(public_path().'/'.$setting->slider_image) && file_exists(public_path().'/'.$setting->slider_image)){ | 
				
			||||
                    unlink(public_path().'/'.$setting->slider_image); | 
				
			||||
                } | 
				
			||||
            } | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        $requestData = $request->all(); | 
				
			||||
        // $requestData['slug'] = Setting::create_slug($requestData['keyword']); | 
				
			||||
        if(isset($image_path1)){ | 
				
			||||
            $requestData['slider_image'] = $image_path1; | 
				
			||||
        } | 
				
			||||
        $setting->fill($requestData); | 
				
			||||
        if($setting->save()){ | 
				
			||||
 | 
				
			||||
            if($request->hasFile('images')){ | 
				
			||||
                 | 
				
			||||
                $accommodation_image = $setting->accommodation_images(); | 
				
			||||
                $accommodation_image->delete(); | 
				
			||||
                foreach($request->file('images') as $imagefile) { | 
				
			||||
                $extension = $imagefile->getClientOriginalExtension(); | 
				
			||||
                $image_folder_type = array_search('accomodation',config('custom.image_folders')); //for image saved in folder | 
				
			||||
                $count = rand(100,999); | 
				
			||||
                $out_put_path = User::save_image($imagefile,$extension,$count,$image_folder_type); | 
				
			||||
                $image_path1 = $out_put_path[0]; | 
				
			||||
                // if (is_file(public_path().'/'.$setting->slider_image) && file_exists(public_path().'/'.$setting->slider_image)){ | 
				
			||||
                //     unlink(public_path().'/'.$setting->slider_image); | 
				
			||||
                // } | 
				
			||||
                $accomodation_image = new AccomodationImage(); | 
				
			||||
                $accomodation_image->accomodation_id = $id; | 
				
			||||
                $accomodation_image->image = $image_path1; | 
				
			||||
                $accomodation_image->save(); | 
				
			||||
                 | 
				
			||||
                } | 
				
			||||
                 | 
				
			||||
            } | 
				
			||||
            | 
				
			||||
            if(\request('feature_name') ){ | 
				
			||||
                $accommodation_feature = $setting->accommodation_features(); | 
				
			||||
                $accommodation_feature->delete(); | 
				
			||||
                    foreach (\request('feature_name') as $index => $value){ | 
				
			||||
                        $setting_point = new AccomodationFeature(); | 
				
			||||
                        $setting_point->accomodation_id = $id; | 
				
			||||
                        $setting_point->feature_name = $value; | 
				
			||||
                        $setting_point->save(); | 
				
			||||
                    } | 
				
			||||
            } | 
				
			||||
 | 
				
			||||
            if(\request('information_name') ){ | 
				
			||||
                $accommodation_information = $setting->accommodation_informations(); | 
				
			||||
                $accommodation_information->delete(); | 
				
			||||
                    foreach (\request('information_name') as $index => $value){ | 
				
			||||
                        $setting_point = new AccomodationInformation(); | 
				
			||||
                        $setting_point->accomodation_id = $id; | 
				
			||||
                        $setting_point->information_name = $value; | 
				
			||||
                        $setting_point->save(); | 
				
			||||
                    } | 
				
			||||
            } | 
				
			||||
 | 
				
			||||
            if(\request('title_name') ){ | 
				
			||||
                $accommodation_title = $setting->accommodation_slider_titles(); | 
				
			||||
                $accommodation_title->delete(); | 
				
			||||
                    foreach (\request('title_name') as $index => $value){ | 
				
			||||
                        $setting_point = new AccomodationSlidertitle(); | 
				
			||||
                        $setting_point->accomodation_id = $id; | 
				
			||||
                        $setting_point->title_name = $value; | 
				
			||||
                        $setting_point->save(); | 
				
			||||
                    } | 
				
			||||
            } | 
				
			||||
                 | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
        Session::flash('success','Accomodation succesffuly edited.'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function delete($id){ | 
				
			||||
        $setting=Accomodation::findorfail($id); | 
				
			||||
        // if($setting->accommodation_features->count() > 0){ | 
				
			||||
        //     $setting->accommodation_features()->delete(); | 
				
			||||
        // } | 
				
			||||
        // if($setting->accommodation_informations->count() > 0){ | 
				
			||||
        //     $setting->accommodation_informations()->delete(); | 
				
			||||
        // } | 
				
			||||
        // if($setting->accommodation_slider_titles->count() > 0){ | 
				
			||||
        //     $setting->accommodation_informations()->delete(); | 
				
			||||
        // } | 
				
			||||
        if($setting->delete()){ | 
				
			||||
            if (is_file(public_path().'/'.$setting->slider_image) && file_exists(public_path().'/'.$setting->slider_image)){ | 
				
			||||
                unlink(public_path().'/'.$setting->slider_image); | 
				
			||||
            } | 
				
			||||
        } | 
				
			||||
        Session::flash('success','Accomodation successfully is deleted !'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function points_remove($id) | 
				
			||||
    { | 
				
			||||
        if(Auth::user()){ | 
				
			||||
            $setting = AccomodationFeature::findorfail($id); | 
				
			||||
            $setting->delete(); | 
				
			||||
            return response()->json(['point_id' => $id]); | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
    public function information_points_remove($id) | 
				
			||||
    { | 
				
			||||
        if(Auth::user()){ | 
				
			||||
            $setting = AccomodationInformation::findorfail($id); | 
				
			||||
            $setting->delete(); | 
				
			||||
            return response()->json(['point_id' => $id]); | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
    public function slider_points_remove($id) | 
				
			||||
    { | 
				
			||||
        if(Auth::user()){ | 
				
			||||
            $setting = AccomodationSliderTitle::findorfail($id); | 
				
			||||
            $setting->delete(); | 
				
			||||
            return response()->json(['point_id' => $id]); | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
} | 
				
			||||
@ -1,112 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers\Admin; | 
				
			||||
 | 
				
			||||
use App\Http\Controllers\Controller; | 
				
			||||
use App\Models\AddSection; | 
				
			||||
use App\Models\Project; | 
				
			||||
use App\Models\User; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
use Illuminate\Support\Facades\Session; | 
				
			||||
 | 
				
			||||
class AddSectionController extends Controller | 
				
			||||
{ | 
				
			||||
    protected $view = 'admin.add_section.'; | 
				
			||||
    protected $redirect = 'admin/add-sections'; | 
				
			||||
 | 
				
			||||
 | 
				
			||||
    public function index(){ | 
				
			||||
        $settings = AddSection::orderBy('id','asc'); | 
				
			||||
        if(\request('status')){ | 
				
			||||
            $key = \request('status'); | 
				
			||||
            $settings = $settings->where('status',$key); | 
				
			||||
        } | 
				
			||||
        $settings = $settings->paginate(config('custom.per_page')); | 
				
			||||
        return view($this->view.'index',compact('settings')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function create(){ | 
				
			||||
 | 
				
			||||
        return view($this->view.'create'); | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function store(Request $request){ | 
				
			||||
        $this->validate(\request(),[ | 
				
			||||
           'link'=>'required|string', | 
				
			||||
            'image'=>'required|file|mimes:jpeg,png,jpg,pdf' | 
				
			||||
        ]); | 
				
			||||
 | 
				
			||||
            if($request->has('image')){ | 
				
			||||
                $extension = \request()->file('image')->getClientOriginalExtension(); | 
				
			||||
                $image_folder_type = array_search('add_section',config('custom.image_folders')); | 
				
			||||
                $count = rand(100,999); | 
				
			||||
                $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); | 
				
			||||
                $image_path1 = $out_put_path[0]; | 
				
			||||
            } | 
				
			||||
        $requestData = $request->all(); | 
				
			||||
        if(isset($image_path1)){ | 
				
			||||
            $requestData['image'] = $image_path1; | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
        $setting = AddSection::create($requestData); | 
				
			||||
        Session::flash('success','Section is created'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function edit($id){ | 
				
			||||
 | 
				
			||||
        $setting = AddSection::findorfail($id); | 
				
			||||
        return view($this->view.'edit',compact('setting')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function update(Request $request , $id){ | 
				
			||||
        $setting =AddSection::findorfail($id); | 
				
			||||
        $this->validate(\request(), [ | 
				
			||||
            'link'=>'required|string', | 
				
			||||
            'image' => 'file|mimes:jpeg,png,jpg,pdf', | 
				
			||||
        ]); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        if($request->hasFile('image')){ | 
				
			||||
            $extension = \request()->file('image')->getClientOriginalExtension(); | 
				
			||||
 | 
				
			||||
            // | 
				
			||||
            $image_folder_type = array_search('project',config('custom.image_folders')); //for image saved in folder search project index in config folder | 
				
			||||
 | 
				
			||||
            $count = rand(100,999); | 
				
			||||
            $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); | 
				
			||||
            $image_path1 = $out_put_path[0]; | 
				
			||||
            if (is_file(public_path().'/'.$setting->image) && file_exists(public_path().'/'.$setting->image)){ | 
				
			||||
                unlink(public_path().'/'.$setting->image); | 
				
			||||
            } | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
        $requestData = $request->all(); | 
				
			||||
        if(isset($image_path1)){ | 
				
			||||
            $requestData['image'] = $image_path1; | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
        $setting->fill($requestData); | 
				
			||||
        $setting->save(); | 
				
			||||
        Session::flash('success','Section is Updated'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function delete($id){ | 
				
			||||
 | 
				
			||||
        $setting=AddSection::findorfail($id); | 
				
			||||
        if($setting->delete()){ | 
				
			||||
            if (is_file(public_path().'/'.$setting->image) && file_exists(public_path().'/'.$setting->image)){ | 
				
			||||
                unlink(public_path().'/'.$setting->image); | 
				
			||||
            } | 
				
			||||
        } | 
				
			||||
        Session::flash('success','Section is deleted !'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
    // | 
				
			||||
} | 
				
			||||
@ -1,27 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers\Admin; | 
				
			||||
 | 
				
			||||
use App\Http\Controllers\Controller; | 
				
			||||
use App\Models\Applicant; | 
				
			||||
use App\Models\User; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
use Illuminate\Support\Facades\Session; | 
				
			||||
 | 
				
			||||
class ApplicantController extends Controller | 
				
			||||
{ | 
				
			||||
    protected $view='admin.applicant.'; | 
				
			||||
    protected $redirect='admin/applicants'; | 
				
			||||
 | 
				
			||||
    public function index(){ | 
				
			||||
        $settings=Applicant::paginate(config('custom.per_page')); | 
				
			||||
       return view($this->view.'index',compact('settings')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function show($id){ | 
				
			||||
        | 
				
			||||
        $applicants = Applicant::findorfail($id); | 
				
			||||
        return view($this->view.'show',compact('applicants')); | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,206 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers\Admin; | 
				
			||||
 | 
				
			||||
use App\Http\Controllers\Controller; | 
				
			||||
use App\Http\Resources\SliderResource; | 
				
			||||
use App\Models\Career; | 
				
			||||
use App\Models\CareerPoint; | 
				
			||||
use App\Models\AboutUsPoint; | 
				
			||||
use App\Models\User; | 
				
			||||
use App\Models\Setting; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
use Illuminate\Support\Facades\Session; | 
				
			||||
 | 
				
			||||
class CareerController extends Controller | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Display a listing of the resource. | 
				
			||||
     * | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
 | 
				
			||||
    protected $view = 'admin.career.'; | 
				
			||||
    protected $redirect = 'admin/careers'; | 
				
			||||
    public function index() | 
				
			||||
    { | 
				
			||||
        $settings = Career::orderBy('id','DESC'); | 
				
			||||
        // if(\request('title1')){ | 
				
			||||
        //     $key = \request('title1'); | 
				
			||||
        //     $settings = $settings->where('title1','like','%'.$key.'%'); | 
				
			||||
        // } | 
				
			||||
        // if(\request('status')){ | 
				
			||||
        //     $key = \request('status'); | 
				
			||||
        //     $settings = $settings->where('status',$key); | 
				
			||||
        // } | 
				
			||||
        $settings = $settings->paginate(config('custom.per_page')); | 
				
			||||
        return view($this->view.'index',compact('settings')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Show the form for creating a new resource. | 
				
			||||
     * | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function create() | 
				
			||||
    { | 
				
			||||
        return view($this->view.'create'); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Store a newly created resource in storage. | 
				
			||||
     * | 
				
			||||
     * @param  \Illuminate\Http\Request  $request | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function store(Request $request) | 
				
			||||
    { | 
				
			||||
        $this->validate(\request(),[ | 
				
			||||
             | 
				
			||||
             | 
				
			||||
            'title' => 'required', | 
				
			||||
            'sub_title' => 'required', | 
				
			||||
            'point_title' => 'required', | 
				
			||||
             | 
				
			||||
            'image' => 'required|file|mimes:jpeg,png,jpg', | 
				
			||||
            'points' => 'required' | 
				
			||||
        ]); | 
				
			||||
 | 
				
			||||
        $setting = new Career(); | 
				
			||||
 | 
				
			||||
        $setting->title = \request('title'); | 
				
			||||
        $setting->point_title = strip_tags(\request('point_title')); | 
				
			||||
        $setting->sub_title = strip_tags(\request('sub_title')); | 
				
			||||
        $setting->status = \request('status'); | 
				
			||||
        $setting->keyword = strip_tags(\request('keyword')); | 
				
			||||
        $setting->seo_title = strip_tags(\request('seo_title')); | 
				
			||||
        $setting->meta_keyword = strip_tags(\request('meta_keyword')); | 
				
			||||
        $setting->seo_description = strip_tags(\request('seo_description')); | 
				
			||||
        $setting->slug = Setting::create_slug(\request('seo_title')); | 
				
			||||
        if($request->hasFile('image')){ | 
				
			||||
                $extension = \request()->file('image')->getClientOriginalExtension(); | 
				
			||||
                $image_folder_type = array_search('career',config('custom.image_folders')); //for image saved in folder | 
				
			||||
                $count = rand(100,999); | 
				
			||||
                $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); | 
				
			||||
                if($extension == "jpeg" || $extension == "jpg" || $extension == "png"){ | 
				
			||||
                    $image_path = $out_put_path[0]; | 
				
			||||
                    $setting->image = $image_path; | 
				
			||||
//                    $setting->doc_name = $out_put_path[2]; | 
				
			||||
                } | 
				
			||||
            } | 
				
			||||
 | 
				
			||||
        if($setting->save()){ | 
				
			||||
            $points = $request->points; | 
				
			||||
            | 
				
			||||
            foreach($points as $point){ | 
				
			||||
                $career_point = new CareerPoint(); | 
				
			||||
                $career_point->career_id = $setting->id; | 
				
			||||
                $career_point->point = $point; | 
				
			||||
                $career_point->save(); | 
				
			||||
            } | 
				
			||||
            Session::flash('success','Career has been created!'); | 
				
			||||
            return redirect($this->redirect); | 
				
			||||
        } | 
				
			||||
         | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Display the specified resource. | 
				
			||||
     * | 
				
			||||
     * @param  int  $id | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function show($id) | 
				
			||||
    { | 
				
			||||
        $about_us = Career::findorfail($id); | 
				
			||||
        return view($this->view.'show',compact('about_us')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Show the form for editing the specified resource. | 
				
			||||
     * | 
				
			||||
     * @param  int  $id | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function edit($id) | 
				
			||||
    { | 
				
			||||
        $about_us = Career::findorfail($id); | 
				
			||||
      return view($this->view.'edit',compact('about_us')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Update the specified resource in storage. | 
				
			||||
     * | 
				
			||||
     * @param  \Illuminate\Http\Request  $request | 
				
			||||
     * @param  int  $id | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function update(Request $request, $id) | 
				
			||||
    { | 
				
			||||
        $setting=Career::findorfail($id); | 
				
			||||
 | 
				
			||||
        $this->validate(\request(),[ | 
				
			||||
            'title' => 'required', | 
				
			||||
            'sub_title' => 'required', | 
				
			||||
            // 'image' => 'file|mimes:jpeg,png,jpg', | 
				
			||||
            'points' => 'required' | 
				
			||||
        ]); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        $setting->title = \request('title'); | 
				
			||||
        $setting->point_title = strip_tags(\request('point_title')); | 
				
			||||
        $setting->sub_title = strip_tags(\request('sub_title')); | 
				
			||||
        $setting->status = \request('status'); | 
				
			||||
        $setting->keyword = strip_tags(\request('keyword')); | 
				
			||||
        $setting->seo_title = strip_tags(\request('seo_title')); | 
				
			||||
        $setting->meta_keyword = strip_tags(\request('meta_keyword')); | 
				
			||||
        $setting->seo_description = strip_tags(\request('seo_description')); | 
				
			||||
        $setting->slug = Setting::create_slug(\request('seo_title')); | 
				
			||||
        if($request->hasFile('image')){ | 
				
			||||
            $extension = \request()->file('image')->getClientOriginalExtension(); | 
				
			||||
            $image_folder_type = array_search('career',config('custom.image_folders')); //for image saved in folder | 
				
			||||
            $count = rand(100,999); | 
				
			||||
            $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); | 
				
			||||
            $image_path = $out_put_path[0]; | 
				
			||||
            $setting->image = $image_path; | 
				
			||||
//                    $setting->doc_name = $out_put_path[2]; | 
				
			||||
        } | 
				
			||||
//        $requestData = $request->all(); | 
				
			||||
//        $setting->fill($requestData); | 
				
			||||
        if($setting->update()){ | 
				
			||||
            $points = $request->points; | 
				
			||||
          | 
				
			||||
            if((!empty($points)) && ($points[0] != null)){ | 
				
			||||
                $career_point = $setting->career_points(); | 
				
			||||
                $career_point->delete(); | 
				
			||||
                foreach($points as $point){ | 
				
			||||
                    $career_point = new CareerPoint(); | 
				
			||||
                    $career_point->career_id = $id; | 
				
			||||
                    $career_point->point = $point; | 
				
			||||
                    $career_point->save(); | 
				
			||||
                } | 
				
			||||
            } | 
				
			||||
            Session::flash('success','Career has been Updated!'); | 
				
			||||
            return redirect($this->redirect); | 
				
			||||
        } | 
				
			||||
         | 
				
			||||
 } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Remove the specified resource from storage. | 
				
			||||
     * | 
				
			||||
     * @param  int  $id | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function destroy($id) | 
				
			||||
    { | 
				
			||||
        // | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function getSliders(){ | 
				
			||||
 | 
				
			||||
        $settings = Slider::where('status',1)->get(); | 
				
			||||
        return SliderResource::collection($settings); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,89 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers\Admin; | 
				
			||||
 | 
				
			||||
use App\Http\Controllers\Controller; | 
				
			||||
use App\Models\Client; | 
				
			||||
use App\Models\Client as Setting; | 
				
			||||
use App\Models\User; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
use Illuminate\Support\Facades\Session; | 
				
			||||
 | 
				
			||||
class ClientController extends Controller | 
				
			||||
{ | 
				
			||||
    protected $view = 'admin.client.'; | 
				
			||||
    protected $redirect = 'admin/clients'; | 
				
			||||
 | 
				
			||||
    public function index() | 
				
			||||
    { | 
				
			||||
        $settings = Setting::paginate(config('custom.per_page')); | 
				
			||||
        return view($this->view.'index',compact('settings')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function create() | 
				
			||||
    { | 
				
			||||
        return view($this->view.'create'); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function store(Request $request) | 
				
			||||
    { | 
				
			||||
        $this->validate(\request(),[ | 
				
			||||
            'logo' =>'required|file|mimes:jpeg,png,jpg,pdf', | 
				
			||||
            'link' =>'required', | 
				
			||||
            'status' =>'required', | 
				
			||||
        ]); | 
				
			||||
 | 
				
			||||
        if(\request('logo')){ | 
				
			||||
            if($request->hasFile('logo')){ | 
				
			||||
                $extension = \request()->file('logo')->getClientOriginalExtension(); | 
				
			||||
                $image_folder_type = array_search('client',config('custom.image_folders')); //for image saved in folder | 
				
			||||
                $count = rand(100,999); | 
				
			||||
                $out_put_path = User::save_image(\request('logo'),$extension,$count,$image_folder_type); | 
				
			||||
                $image_path1 = $out_put_path[0]; | 
				
			||||
            } | 
				
			||||
        } | 
				
			||||
        $requestData = $request->all(); | 
				
			||||
        if(isset($image_path1)){ | 
				
			||||
            $requestData['logo'] = $image_path1; | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
        Setting::create($requestData); | 
				
			||||
        Session::flash('success','Testimonial is created!'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
    } | 
				
			||||
    public function edit($id){ | 
				
			||||
       $setting= Client::findorfail($id); | 
				
			||||
       return view($this->view.'edit',compact('setting')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function update(Request $request ,$id){ | 
				
			||||
        $setting = Client::findorfail($id); | 
				
			||||
        $this->validate(\request(),[ | 
				
			||||
            'logo' =>'file|mimes:jpeg,png,jpg,pdf', | 
				
			||||
            'link' =>'required', | 
				
			||||
            'status' =>'required', | 
				
			||||
        ]); | 
				
			||||
 | 
				
			||||
        if(\request('logo')){ | 
				
			||||
            if($request->hasFile('logo')){ | 
				
			||||
                $extension = \request()->file('logo')->getClientOriginalExtension(); | 
				
			||||
                $image_folder_type = array_search('client',config('custom.image_folders')); //for image saved in folder | 
				
			||||
                $count = rand(100,999); | 
				
			||||
                $out_put_path = User::save_image(\request('logo'),$extension,$count,$image_folder_type); | 
				
			||||
                $image_path1 = $out_put_path[0]; | 
				
			||||
            } | 
				
			||||
        } | 
				
			||||
        $requestData = $request->all(); | 
				
			||||
        if(isset($image_path1)){ | 
				
			||||
            $requestData['logo'] = $image_path1; | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
        $setting->fill($requestData); | 
				
			||||
        $setting->save(); | 
				
			||||
        Session::flash('success','Testimonial is Updated!'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
 | 
				
			||||
} | 
				
			||||
@ -1,99 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers\Admin; | 
				
			||||
 | 
				
			||||
use App\Http\Controllers\Controller; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
use App\Models\Contact; | 
				
			||||
use App\Models\ContactDescription; | 
				
			||||
use Illuminate\Support\Facades\Session; | 
				
			||||
use Mail; | 
				
			||||
 | 
				
			||||
class ContactUsController extends Controller | 
				
			||||
{ | 
				
			||||
    protected $view = 'admin.contact.'; | 
				
			||||
    protected $redirect = 'admin/contacts'; | 
				
			||||
 | 
				
			||||
    public function index() | 
				
			||||
    { | 
				
			||||
        $settings = Contact::orderBy('id','DESC'); | 
				
			||||
        if(\request('fullname')){ | 
				
			||||
            $key = \request('fullname'); | 
				
			||||
            $settings = $settings->where('fullname','like','%'.$key.'%'); | 
				
			||||
        } | 
				
			||||
        if(\request('status')){ | 
				
			||||
            $key = \request('status'); | 
				
			||||
            $settings = $settings->where('status',$key); | 
				
			||||
        } | 
				
			||||
        $contacts = $settings->paginate(config('custom.per_page')); | 
				
			||||
        return view($this->view.'index',compact('contacts')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function show($id) | 
				
			||||
    { | 
				
			||||
        | 
				
			||||
        $contact = new Contact(); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        $contact = $contact->findorfail($id); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        return view($this->view . 'show', compact('contact')); | 
				
			||||
    } | 
				
			||||
    public function store(Request $request){ | 
				
			||||
 | 
				
			||||
        $this->validate(\request(),[ | 
				
			||||
            'name' => 'required', | 
				
			||||
            'email' => 'required|indisposable', | 
				
			||||
            'phone' => 'required|digits:10', | 
				
			||||
 | 
				
			||||
        ]); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        $contact = new ContactUs(); | 
				
			||||
        $contact->name = \request('name'); | 
				
			||||
        $contact->email = \request('email'); | 
				
			||||
        $contact->phone = \request('phone'); | 
				
			||||
        $contact->query_type = \request('query_type'); | 
				
			||||
        $contact->status = 1; | 
				
			||||
        $contact->email_verified_at = \request('email_verified_at'); | 
				
			||||
 | 
				
			||||
        if($contact->save()){ | 
				
			||||
 | 
				
			||||
            $contact_description = new ContactDescription(); | 
				
			||||
            $contact_description->contact_us_id = $contact->id; | 
				
			||||
            $contact_description->contact_us_type = \request('contact_us_type'); | 
				
			||||
            $contact_description->message = \request('message'); | 
				
			||||
            $contact_description->save(); | 
				
			||||
 | 
				
			||||
           \Mail::send('admin.contact.mail', array( | 
				
			||||
 | 
				
			||||
           'name' =>\request('name'), | 
				
			||||
 | 
				
			||||
           'email' =>\request('email'), | 
				
			||||
 | 
				
			||||
           'query_type' => (\request('query_type') == '1') ? 'Contact' : 'Quick Enquiry', | 
				
			||||
 | 
				
			||||
           'contact_us_type' =>(\request('contact_us_type') == '1') ? 'Academic' : 'Service', | 
				
			||||
 | 
				
			||||
           'phone' =>\request('phone'), | 
				
			||||
 | 
				
			||||
           'msg' => \request('message'), | 
				
			||||
 | 
				
			||||
           'subject' => 'Contact Form', | 
				
			||||
 | 
				
			||||
          ), function($message) use ($request){ | 
				
			||||
 | 
				
			||||
           $subject='Contact Form'; | 
				
			||||
 | 
				
			||||
           $message->to('info@extratechs.com.au', 'Extratech')->subject($subject); | 
				
			||||
 | 
				
			||||
          }); | 
				
			||||
 | 
				
			||||
         return response()->json(['success' => 'Your query is submitted successfully.','status' =>'Ok'],200); | 
				
			||||
 | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
} | 
				
			||||
@ -1,62 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers\Admin; | 
				
			||||
 | 
				
			||||
use App\Http\Controllers\Controller; | 
				
			||||
use App\Models\department; | 
				
			||||
use App\Models\SubOffice; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
use Illuminate\Support\Facades\Session; | 
				
			||||
 | 
				
			||||
class DepartmentController extends Controller | 
				
			||||
{ | 
				
			||||
    protected $view='admin.department.'; | 
				
			||||
    protected $redirect='admin/departments'; | 
				
			||||
 | 
				
			||||
    public function index(){ | 
				
			||||
        $settings = department::Paginate(config('custom.per_page')); | 
				
			||||
        return view($this->view.'index',compact('settings')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function create(){ | 
				
			||||
        $settings=SubOffice::all(); | 
				
			||||
        return view($this->view.'create',compact('settings')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function store(Request $request){ | 
				
			||||
        $this->validate(\request(),[ | 
				
			||||
            'name'=>'required|string', | 
				
			||||
            'sub_office_id'=>'required', | 
				
			||||
        ]); | 
				
			||||
        $requestData=$request->all(); | 
				
			||||
        $setting=department::create($requestData); | 
				
			||||
        Session::flash('success','Department is created'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function edit($id){ | 
				
			||||
        $settings=department::findorfail($id); | 
				
			||||
        $sub_offices=SubOffice::all(); | 
				
			||||
        return view($this->view.'edit',compact('settings'),compact('sub_offices')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function update(Request $request ,$id){ | 
				
			||||
        $setting =department::findorfail($id); | 
				
			||||
 | 
				
			||||
        $this->validate(\request(),[ | 
				
			||||
            'name'=>'required|string', | 
				
			||||
            'sub_office_id'=>'required', | 
				
			||||
        ]); | 
				
			||||
        $requestData=$request->all(); | 
				
			||||
        $setting->fill($requestData); | 
				
			||||
        $setting->save(); | 
				
			||||
        Session::flash('success','Department is Updated'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function delete(){ | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,37 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers\Admin; | 
				
			||||
 | 
				
			||||
use App\Http\Controllers\Controller; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
use App\Models\ContactUs; | 
				
			||||
use App\Models\ContactDescription; | 
				
			||||
use App\Models\PersonalDetail; | 
				
			||||
use Illuminate\Support\Facades\Session; | 
				
			||||
use Mail; | 
				
			||||
 | 
				
			||||
class EnrollmentController extends Controller | 
				
			||||
{ | 
				
			||||
    protected $view = 'admin.enrollment.'; | 
				
			||||
    protected $redirect = 'admin/enrollments'; | 
				
			||||
 | 
				
			||||
    public function index() | 
				
			||||
    { | 
				
			||||
        $personal_details = PersonalDetail::paginate(config('custom.per_page')); | 
				
			||||
        return view($this->view.'index',compact('personal_details')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function show($id) | 
				
			||||
    { | 
				
			||||
        | 
				
			||||
        $personal_detail = new PersonalDetail(); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        $personal_detail = $personal_detail->findorfail($id); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        return view($this->view . 'show', compact('personal_detail')); | 
				
			||||
    } | 
				
			||||
    | 
				
			||||
        | 
				
			||||
} | 
				
			||||
@ -1,152 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers\Admin; | 
				
			||||
 | 
				
			||||
use App\Http\Controllers\Controller; | 
				
			||||
use App\Models\Academy; | 
				
			||||
use App\Models\Gallery; | 
				
			||||
use App\Models\BlogPoint; | 
				
			||||
use App\Models\NewsAndUpdatePoint; | 
				
			||||
use App\Models\Setting; | 
				
			||||
use App\Models\User; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
use Illuminate\Support\Facades\Auth; | 
				
			||||
use Illuminate\Support\Facades\Session; | 
				
			||||
use function GuzzleHttp\Promise\all; | 
				
			||||
 | 
				
			||||
class GalleryController extends Controller | 
				
			||||
{ | 
				
			||||
    protected $view = 'admin.gallery.'; | 
				
			||||
    protected $redirect = 'admin/galleries'; | 
				
			||||
 | 
				
			||||
    public function index() | 
				
			||||
    { | 
				
			||||
        $settings = Gallery::orderBy('id','DESC'); | 
				
			||||
 | 
				
			||||
        if(\request('name')){ | 
				
			||||
            $key = \request('name'); | 
				
			||||
            $settings = $settings->where('title','like','%'.$key.'%'); | 
				
			||||
        } | 
				
			||||
        if(\request('status')){ | 
				
			||||
            $key = \request('status'); | 
				
			||||
            $settings = $settings->where('status',$key); | 
				
			||||
        } | 
				
			||||
        $settings = $settings->paginate(config('custom.per_page')); | 
				
			||||
        return view($this->view.'index',compact('settings')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function create() | 
				
			||||
    { | 
				
			||||
        return view($this->view . 'create'); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function store(Request $request) | 
				
			||||
    {        | 
				
			||||
         | 
				
			||||
    | 
				
			||||
            $this->validate(\request(), [ | 
				
			||||
              | 
				
			||||
                'seo_title' => 'nullable', | 
				
			||||
                'seo_description' => 'nullable', | 
				
			||||
                | 
				
			||||
                'keyword' => 'required', | 
				
			||||
                'meta-keyword' => 'nullable', | 
				
			||||
                'status' => 'required', | 
				
			||||
                'image' => 'required|file|mimes:jpeg,png,jpg,pdf' | 
				
			||||
            ]); | 
				
			||||
            if($request->hasFile('image')){ | 
				
			||||
                $extension = \request()->file('image')->getClientOriginalExtension(); | 
				
			||||
                $image_folder_type = array_search('gallery',config('custom.image_folders')); //for image saved in folder | 
				
			||||
                $count = rand(100,999); | 
				
			||||
                $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); | 
				
			||||
                $image_path1 = $out_put_path[0]; | 
				
			||||
            } | 
				
			||||
 | 
				
			||||
        $requestData = $request->all(); | 
				
			||||
        if(isset($image_path1)){ | 
				
			||||
            $requestData['image'] = $image_path1; | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
        $requestData['slug'] = Setting::create_slug($requestData['keyword']); | 
				
			||||
        $setting = Gallery::create($requestData); | 
				
			||||
         | 
				
			||||
        Session::flash('success','Gallery successfully created'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function show($id) | 
				
			||||
    { | 
				
			||||
        $setting =Gallery::findorfail($id); | 
				
			||||
        return view($this->view.'show',compact('setting')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function edit($id){ | 
				
			||||
        $setting =Gallery::findorfail($id); | 
				
			||||
        return view($this->view.'edit',compact('setting')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function update(Request $request, $id){ | 
				
			||||
 | 
				
			||||
//        dd(\request()->all()); | 
				
			||||
        $setting =Gallery::findorfail($id); | 
				
			||||
        $this->validate(\request(), [ | 
				
			||||
            'seo_title' => 'nullable', | 
				
			||||
            'seo_description' => 'nullable', | 
				
			||||
            'keyword' => 'required', | 
				
			||||
            'meta-keyword' => 'nullable', | 
				
			||||
            'status' => 'required', | 
				
			||||
        ]); | 
				
			||||
 | 
				
			||||
        if(\request('image')){ | 
				
			||||
            $this->validate(\request(),[ | 
				
			||||
                'image' => 'file|mimes:jpeg,png,jpg,pdf' | 
				
			||||
            ]); | 
				
			||||
            if($request->hasFile('image')){ | 
				
			||||
                $extension = \request()->file('image')->getClientOriginalExtension(); | 
				
			||||
                $image_folder_type = array_search('gallery',config('custom.image_folders')); //for image saved in folder | 
				
			||||
                $count = rand(100,999); | 
				
			||||
                $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); | 
				
			||||
                $image_path1 = $out_put_path[0]; | 
				
			||||
                if (is_file(public_path().'/'.$setting->image) && file_exists(public_path().'/'.$setting->image)){ | 
				
			||||
                    unlink(public_path().'/'.$setting->image); | 
				
			||||
                } | 
				
			||||
            } | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        $requestData = $request->all(); | 
				
			||||
        $requestData['slug'] = Setting::create_slug($requestData['keyword']); | 
				
			||||
        if(isset($image_path1)){ | 
				
			||||
            $requestData['image'] = $image_path1; | 
				
			||||
        } | 
				
			||||
        $setting->fill($requestData); | 
				
			||||
        $setting->save(); | 
				
			||||
         | 
				
			||||
        Session::flash('success','Gallery succesffuly updated.'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function delete($id){ | 
				
			||||
        $setting=Gallery::findorfail($id); | 
				
			||||
         | 
				
			||||
        if($setting->delete()){ | 
				
			||||
            if (is_file(public_path().'/'.$setting->image) && file_exists(public_path().'/'.$setting->image)){ | 
				
			||||
                unlink(public_path().'/'.$setting->image); | 
				
			||||
            } | 
				
			||||
        } | 
				
			||||
        Session::flash('success','Gallery is deleted !'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    // public function blog_point($blog_point_id) | 
				
			||||
    // { | 
				
			||||
    //     if(Auth::user()){ | 
				
			||||
    //         $setting = BlogPoint::findorfail($blog_point_id); | 
				
			||||
    //         $setting->delete(); | 
				
			||||
    //         return response()->json(['blog_point_id' => $blog_point_id]); | 
				
			||||
    //     } | 
				
			||||
 | 
				
			||||
    // } | 
				
			||||
 | 
				
			||||
} | 
				
			||||
@ -1,95 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers\Admin; | 
				
			||||
 | 
				
			||||
use App\Http\Controllers\Controller; | 
				
			||||
use App\Models\Contact; | 
				
			||||
use App\Models\Referral; | 
				
			||||
use App\Models\Subscription; | 
				
			||||
use App\Models\Service; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
use Illuminate\Routing\Route; | 
				
			||||
use Illuminate\Support\Facades\Auth; | 
				
			||||
use Illuminate\Support\Facades\Session; | 
				
			||||
use Illuminate\Support\Facades\Hash; | 
				
			||||
 | 
				
			||||
use App\Models\User; | 
				
			||||
 | 
				
			||||
class HomeController extends Controller | 
				
			||||
{ | 
				
			||||
    public function indexAdmin() | 
				
			||||
    { | 
				
			||||
        if(Auth::check()){ | 
				
			||||
            $service= Service::where('status',true); | 
				
			||||
            $contact= Contact::all(); | 
				
			||||
            $subscription= Contact::all(); | 
				
			||||
             $contacts = Contact::paginate(config('custom.per_page')); | 
				
			||||
            // $referrals=Referral::paginate(config('custom.per_page')); | 
				
			||||
            return view('admin.index', compact( 'service', 'contact', 'contacts','subscription')); | 
				
			||||
        } | 
				
			||||
        return view('admin.login'); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function getLogin() | 
				
			||||
    { | 
				
			||||
        if(Auth::check()){ | 
				
			||||
            return redirect('admin/index'); | 
				
			||||
        } | 
				
			||||
        return view('admin.login'); | 
				
			||||
    } | 
				
			||||
    public function postLogin() | 
				
			||||
    { | 
				
			||||
        $this->validate(request(),[ | 
				
			||||
            'email'=>'required', | 
				
			||||
            'password'=>'required', | 
				
			||||
        ]); | 
				
			||||
//        dd(\request()->all()); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        if (Auth::attempt(['email'=>request('email'),'password'=>request('password')],request()->has('remember'))){ | 
				
			||||
            return redirect('admin/index'); | 
				
			||||
        } | 
				
			||||
//        Session::flash('success','Invalid Credential!'); | 
				
			||||
        return redirect('login')->withErrors(['Invalid Credentials!']); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function admin() | 
				
			||||
    { | 
				
			||||
        if(Auth::check()){ | 
				
			||||
            return view('admin.index'); | 
				
			||||
        } | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function getLogout() | 
				
			||||
    { | 
				
			||||
        Auth::logout(); | 
				
			||||
        return redirect('login'); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function change_password(){ | 
				
			||||
        return view('admin.change_password_form'); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function update_password(Request $request){ | 
				
			||||
        $request->validate([ | 
				
			||||
            'old_password' => 'required', | 
				
			||||
            'password' => 'required|min:8|confirmed', | 
				
			||||
        ]); | 
				
			||||
        $user = auth()->user(); | 
				
			||||
         | 
				
			||||
        if(Hash::check($request->old_password,$user->password)){ | 
				
			||||
 | 
				
			||||
            $user = User::findorfail($user->id); | 
				
			||||
            if($user->update(['password' => Hash::make($request->password)])){ | 
				
			||||
                return redirect()->back()->with('success','Password is successfully updated.'); | 
				
			||||
            } | 
				
			||||
        } | 
				
			||||
        return redirect()->back()->with('custom_error','Your old password is incorrect! Please try again.'); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
         | 
				
			||||
 | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,206 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers\Admin; | 
				
			||||
 | 
				
			||||
use App\Http\Controllers\Controller; | 
				
			||||
use App\Models\Academy; | 
				
			||||
use App\Models\NewsAndUpdate; | 
				
			||||
use App\Models\BlogPoint; | 
				
			||||
use App\Models\NewsAndUpdatePoint; | 
				
			||||
use App\Models\Setting; | 
				
			||||
use App\Models\User; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
use Illuminate\Support\Facades\Auth; | 
				
			||||
use Illuminate\Support\Facades\Session; | 
				
			||||
use function GuzzleHttp\Promise\all; | 
				
			||||
 | 
				
			||||
class NewsAndUpdateController extends Controller | 
				
			||||
{ | 
				
			||||
    protected $view = 'admin.news_and_update.'; | 
				
			||||
    protected $redirect = 'admin/news_and_updates'; | 
				
			||||
 | 
				
			||||
    public function index() | 
				
			||||
    { | 
				
			||||
        $settings = NewsAndUpdate::orderBy('id','DESC'); | 
				
			||||
 | 
				
			||||
        if(\request('name')){ | 
				
			||||
            $key = \request('name'); | 
				
			||||
            $settings = $settings->where('title','like','%'.$key.'%'); | 
				
			||||
        } | 
				
			||||
        if(\request('status')){ | 
				
			||||
            $key = \request('status'); | 
				
			||||
            $settings = $settings->where('status',$key); | 
				
			||||
        } | 
				
			||||
        $settings = $settings->paginate(config('custom.per_page')); | 
				
			||||
        return view($this->view.'index',compact('settings')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function create() | 
				
			||||
    { | 
				
			||||
        return view($this->view . 'create'); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function store(Request $request) | 
				
			||||
    {        | 
				
			||||
         | 
				
			||||
    | 
				
			||||
            $this->validate(\request(), [ | 
				
			||||
                'description' => 'required', | 
				
			||||
                // 'bottom_description' => 'required', | 
				
			||||
                'seo_title' => 'nullable', | 
				
			||||
                'seo_description' => 'nullable', | 
				
			||||
                'publish_date' =>'required', | 
				
			||||
                'keyword' => 'required', | 
				
			||||
                'meta-keyword' => 'nullable', | 
				
			||||
                'status' => 'required', | 
				
			||||
                'image' => 'required|file|mimes:jpeg,png,jpg,pdf', | 
				
			||||
                'thumbnail' => 'required', | 
				
			||||
            ]); | 
				
			||||
            if($request->hasFile('image')){ | 
				
			||||
                $extension = \request()->file('image')->getClientOriginalExtension(); | 
				
			||||
                $image_folder_type = array_search('news_and_update',config('custom.image_folders')); //for image saved in folder | 
				
			||||
                $count = rand(100,999); | 
				
			||||
                $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); | 
				
			||||
                $image_path1 = $out_put_path[0]; | 
				
			||||
            } | 
				
			||||
            if($request->hasFile('thumbnail')){ | 
				
			||||
                $extension = \request()->file('thumbnail')->getClientOriginalExtension(); | 
				
			||||
                $image_folder_type = array_search('news_and_update',config('custom.image_folders')); //for image saved in folder | 
				
			||||
                $count = rand(100,999); | 
				
			||||
                $out_put_path = User::save_image(\request('thumbnail'),$extension,$count,$image_folder_type); | 
				
			||||
                $thumbnail_path1 = $out_put_path[0]; | 
				
			||||
            } | 
				
			||||
 | 
				
			||||
        $requestData = $request->all(); | 
				
			||||
        if(isset($image_path1)){ | 
				
			||||
            $requestData['image'] = $image_path1; | 
				
			||||
        } | 
				
			||||
        if(isset($thumbnail_path1)){ | 
				
			||||
            $requestData['thumbnail'] = $thumbnail_path1; | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
        $requestData['slug'] = Setting::create_slug($requestData['keyword']); | 
				
			||||
        $setting = NewsAndUpdate::create($requestData); | 
				
			||||
        if(\request('point_title')){ | 
				
			||||
            foreach (\request('point') as $index => $value){ | 
				
			||||
                $setting_point = new NewsAndUpdatePoint(); | 
				
			||||
                $setting_point->news_and_update_id = $setting->id; | 
				
			||||
                $setting_point->point = $value; | 
				
			||||
                $setting_point->save(); | 
				
			||||
            } | 
				
			||||
        } | 
				
			||||
        Session::flash('success','Blog successfully created'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function show($id) | 
				
			||||
    { | 
				
			||||
        $setting =NewsAndUpdate::findorfail($id); | 
				
			||||
        return view($this->view.'show',compact('setting')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function edit($id){ | 
				
			||||
        $setting =NewsAndUpdate::findorfail($id); | 
				
			||||
        return view($this->view.'edit',compact('setting')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function update(Request $request, $id){ | 
				
			||||
 | 
				
			||||
        $setting =NewsAndUpdate::findorfail($id); | 
				
			||||
        $this->validate(\request(), [ | 
				
			||||
            'description' => 'required', | 
				
			||||
            'seo_title' => 'nullable', | 
				
			||||
            'seo_description' => 'nullable', | 
				
			||||
            'keyword' => 'required', | 
				
			||||
            'meta-keyword' => 'nullable', | 
				
			||||
            'status' => 'required', | 
				
			||||
            'publish_date'=>'required', | 
				
			||||
        ]); | 
				
			||||
 | 
				
			||||
        if(\request('image')){ | 
				
			||||
            $this->validate(\request(),[ | 
				
			||||
                'image' => 'file|mimes:jpeg,png,jpg' | 
				
			||||
            ]); | 
				
			||||
            if($request->hasFile('image')){ | 
				
			||||
                $extension = \request()->file('image')->getClientOriginalExtension(); | 
				
			||||
                $image_folder_type = array_search('news_and_update',config('custom.image_folders')); //for image saved in folder | 
				
			||||
                $count = rand(100,999); | 
				
			||||
                $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); | 
				
			||||
                $image_path1 = $out_put_path[0]; | 
				
			||||
                if (is_file(public_path().'/'.$setting->image) && file_exists(public_path().'/'.$setting->image)){ | 
				
			||||
                    unlink(public_path().'/'.$setting->image); | 
				
			||||
                } | 
				
			||||
            } | 
				
			||||
             | 
				
			||||
        } | 
				
			||||
        if($request->hasFile('thumbnail')){ | 
				
			||||
            $extension = \request()->file('thumbnail')->getClientOriginalExtension(); | 
				
			||||
            $image_folder_type = array_search('news_and_update',config('custom.image_folders')); //for image saved in folder | 
				
			||||
            $count = rand(100,999); | 
				
			||||
            $out_put_path = User::save_image(\request('thumbnail'),$extension,$count,$image_folder_type); | 
				
			||||
            $thumbnail_path1 = $out_put_path[0]; | 
				
			||||
            if (is_file(public_path().'/'.$setting->thumbnail) && file_exists(public_path().'/'.$setting->thumbnail)){ | 
				
			||||
                unlink(public_path().'/'.$setting->thumbnail); | 
				
			||||
            } | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        $requestData = $request->all(); | 
				
			||||
        $requestData['slug'] = Setting::create_slug($requestData['keyword']); | 
				
			||||
        if(isset($image_path1)){ | 
				
			||||
            $requestData['image'] = $image_path1; | 
				
			||||
        } | 
				
			||||
        if(isset($thumbnail_path1)){ | 
				
			||||
            $requestData['thumbnail'] = $thumbnail_path1; | 
				
			||||
        } | 
				
			||||
        $setting->fill($requestData); | 
				
			||||
        $setting->save(); | 
				
			||||
        if(\request('point_title') ){ | 
				
			||||
            if(\request('point')){ | 
				
			||||
                foreach (\request('point') as $index => $value){ | 
				
			||||
                    $setting_point = new NewsAndUpdatePoint(); | 
				
			||||
                    $setting_point->news_and_update_id = $setting->id; | 
				
			||||
                    $setting_point->point = $value; | 
				
			||||
                    $setting_point->save(); | 
				
			||||
                } | 
				
			||||
            } | 
				
			||||
            if(\request('point_old_id')){ | 
				
			||||
                foreach (\request('point_old_id') as $in => $value1){ | 
				
			||||
                    $setting_point_update = NewsAndUpdatePoint::findOrFail($value1); | 
				
			||||
                    $setting_point_update->news_and_update_id = $setting->id; | 
				
			||||
                    $setting_point_update->point = \request('point_old')[$in]; | 
				
			||||
                    $setting_point_update->save(); | 
				
			||||
                } | 
				
			||||
            } | 
				
			||||
 | 
				
			||||
        } | 
				
			||||
        Session::flash('success','News and Update succesfully edited.'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function delete($id){ | 
				
			||||
        $setting=NewsAndUpdate::findorfail($id); | 
				
			||||
        if($setting->news_and_update_points->count() > 0){ | 
				
			||||
            $setting->news_and_update_points()->delete(); | 
				
			||||
        } | 
				
			||||
        if($setting->delete()){ | 
				
			||||
            if (is_file(public_path().'/'.$setting->image) && file_exists(public_path().'/'.$setting->image)){ | 
				
			||||
                unlink(public_path().'/'.$setting->image); | 
				
			||||
            } | 
				
			||||
        } | 
				
			||||
        Session::flash('success','News and Update is deleted !'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function blog_point($blog_point_id) | 
				
			||||
    { | 
				
			||||
        if(Auth::user()){ | 
				
			||||
            $setting = BlogPoint::findorfail($blog_point_id); | 
				
			||||
            $setting->delete(); | 
				
			||||
            return response()->json(['blog_point_id' => $blog_point_id]); | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
} | 
				
			||||
@ -1,121 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers\Admin; | 
				
			||||
 | 
				
			||||
use App\Http\Controllers\Controller; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
use App\Models\Partner; | 
				
			||||
use App\Models\User; | 
				
			||||
use Illuminate\Support\Facades\Session; | 
				
			||||
 | 
				
			||||
class PartnerController extends Controller | 
				
			||||
{ | 
				
			||||
    protected $view = 'admin.partner.'; | 
				
			||||
    protected $redirect = 'admin/partners'; | 
				
			||||
    public function index() | 
				
			||||
    { | 
				
			||||
        $settings = Partner::orderBy('id','DESC'); | 
				
			||||
        // if(\request('title')){ | 
				
			||||
        //     $key = \request('title1'); | 
				
			||||
        //     $settings = $settings->where('title1','like','%'.$key.'%'); | 
				
			||||
        // } | 
				
			||||
        // if(\request('status')){ | 
				
			||||
        //     $key = \request('status'); | 
				
			||||
        //     $settings = $settings->where('status',$key); | 
				
			||||
        // } | 
				
			||||
        $settings = $settings->paginate(config('custom.per_page')); | 
				
			||||
        return view($this->view.'index',compact('settings')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function create() | 
				
			||||
    { | 
				
			||||
        return view($this->view.'create'); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function store(Request $request) | 
				
			||||
    {        | 
				
			||||
         | 
				
			||||
    | 
				
			||||
            $this->validate(\request(), [ | 
				
			||||
              | 
				
			||||
                // 'title' => 'required', | 
				
			||||
                'status' => 'required', | 
				
			||||
                'image' => 'required|file|mimes:jpeg,png,jpg' | 
				
			||||
            ]); | 
				
			||||
            if($request->hasFile('image')){ | 
				
			||||
                $extension = \request()->file('image')->getClientOriginalExtension(); | 
				
			||||
                $image_folder_type = array_search('partner',config('custom.image_folders')); //for image saved in folder | 
				
			||||
                $count = rand(100,999); | 
				
			||||
                $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); | 
				
			||||
                $image_path1 = $out_put_path[0]; | 
				
			||||
            } | 
				
			||||
 | 
				
			||||
        $requestData = $request->all(); | 
				
			||||
        if(isset($image_path1)){ | 
				
			||||
            $requestData['image'] = $image_path1; | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
        // $requestData['slug'] = Setting::create_slug($requestData['keyword']); | 
				
			||||
        $setting = Partner::create($requestData); | 
				
			||||
         | 
				
			||||
        Session::flash('success','Partner successfully created'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function edit($id) | 
				
			||||
    { | 
				
			||||
        $setting = Partner::findorfail($id); | 
				
			||||
      return view($this->view.'edit',compact('setting')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function update(Request $request, $id){ | 
				
			||||
 | 
				
			||||
                $setting =Partner::findorfail($id); | 
				
			||||
                $this->validate(\request(), [ | 
				
			||||
                    // 'name' => 'required', | 
				
			||||
                    'status' => 'required', | 
				
			||||
                    'image' => 'file|mimes:jpeg,png,jpg,pdf' | 
				
			||||
                ]); | 
				
			||||
         | 
				
			||||
                if(\request('image')){ | 
				
			||||
                    $this->validate(\request(),[ | 
				
			||||
                        'image' => 'file|mimes:jpeg,png,jpg,pdf' | 
				
			||||
                    ]); | 
				
			||||
                    if($request->hasFile('image')){ | 
				
			||||
                        $extension = \request()->file('image')->getClientOriginalExtension(); | 
				
			||||
                        $image_folder_type = array_search('partner',config('custom.image_folders')); //for image saved in folder | 
				
			||||
                        $count = rand(100,999); | 
				
			||||
                        $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); | 
				
			||||
                        $image_path1 = $out_put_path[0]; | 
				
			||||
                        if (is_file(public_path().'/'.$setting->image) && file_exists(public_path().'/'.$setting->image)){ | 
				
			||||
                            unlink(public_path().'/'.$setting->image); | 
				
			||||
                        } | 
				
			||||
                    } | 
				
			||||
                } | 
				
			||||
         | 
				
			||||
         | 
				
			||||
                $requestData = $request->all(); | 
				
			||||
                // $requestData['slug'] = Setting::create_slug($requestData['keyword']); | 
				
			||||
                if(isset($image_path1)){ | 
				
			||||
                    $requestData['image'] = $image_path1; | 
				
			||||
                } | 
				
			||||
                $setting->fill($requestData); | 
				
			||||
                $setting->save(); | 
				
			||||
                 | 
				
			||||
                Session::flash('success','Partner succesffuly updated.'); | 
				
			||||
                return redirect($this->redirect); | 
				
			||||
         | 
				
			||||
            } | 
				
			||||
         | 
				
			||||
            public function delete($id){ | 
				
			||||
                $setting=Partner::findorfail($id); | 
				
			||||
                 | 
				
			||||
                if($setting->delete()){ | 
				
			||||
                    if (is_file(public_path().'/'.$setting->image) && file_exists(public_path().'/'.$setting->image)){ | 
				
			||||
                        unlink(public_path().'/'.$setting->image); | 
				
			||||
                    } | 
				
			||||
                } | 
				
			||||
                Session::flash('success','Partner is deleted !'); | 
				
			||||
                return redirect($this->redirect); | 
				
			||||
            } | 
				
			||||
} | 
				
			||||
@ -1,33 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers\Admin; | 
				
			||||
 | 
				
			||||
use App\Http\Controllers\Controller; | 
				
			||||
use App\Models\Referral; | 
				
			||||
use App\Models\User; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
use Illuminate\Support\Facades\Session; | 
				
			||||
 | 
				
			||||
class ReferralController extends Controller | 
				
			||||
{ | 
				
			||||
    protected $view='admin.referral.'; | 
				
			||||
    protected $redirect='admin/referrals'; | 
				
			||||
    public function index(){ | 
				
			||||
        $settings=Referral::paginate(config('custom.per_page')); | 
				
			||||
       return view($this->view.'index',compact('settings')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
     | 
				
			||||
 | 
				
			||||
     | 
				
			||||
    public function show($id){ | 
				
			||||
         | 
				
			||||
        $referral=Referral::findorfail($id); | 
				
			||||
        return view($this->view.'show',compact('referral')); | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,66 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers\admin; | 
				
			||||
 | 
				
			||||
use App\Http\Controllers\Controller; | 
				
			||||
use App\Models\SeoTitle; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
use Illuminate\Support\Facades\Session; | 
				
			||||
 | 
				
			||||
class SeoTitleController extends Controller | 
				
			||||
{ | 
				
			||||
    protected $view = 'admin.seo_title.'; | 
				
			||||
    protected $redirect = 'admin/seo_titles'; | 
				
			||||
 | 
				
			||||
    public function index(){ | 
				
			||||
        $settings = SeoTitle::paginate(config('custom.per_page')); | 
				
			||||
        return view($this->view.'index',compact('settings')); | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
    public function create(){ | 
				
			||||
        return view($this->view.'create'); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function store(Request $request){ | 
				
			||||
 | 
				
			||||
      $this->validate(\request(),[ | 
				
			||||
          'seo_type'=>'required', | 
				
			||||
          'status' => 'required' | 
				
			||||
      ]); | 
				
			||||
      $requestData = $request->all(); | 
				
			||||
      $setting = SeoTitle::create($requestData); | 
				
			||||
 | 
				
			||||
        Session::flash('success','SEO Type is created'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function edit($id){ | 
				
			||||
        $setting = SeoTitle::findorfail($id); | 
				
			||||
        return view($this->view.'edit',compact('setting')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function update(Request $request ,$id){ | 
				
			||||
        $setting = SeoTitle::findorfail($id); | 
				
			||||
 | 
				
			||||
        $this->validate(\request(),[ | 
				
			||||
            'seo_type'=>'required', | 
				
			||||
            'status' => 'required' | 
				
			||||
        ]); | 
				
			||||
        $requestData = $request->all(); | 
				
			||||
        $setting->fill($requestData); | 
				
			||||
        $setting->save(); | 
				
			||||
 | 
				
			||||
        Session::flash('success','Seo Title is Updated'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function delete($id){ | 
				
			||||
 | 
				
			||||
        $setting=SeoTitle::findorfail($id); | 
				
			||||
            $setting->delete(); | 
				
			||||
        Session::flash('success','Seo Title is deleted !'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
    // | 
				
			||||
} | 
				
			||||
@ -1,291 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers\Admin; | 
				
			||||
 | 
				
			||||
use App\Http\Controllers\Controller; | 
				
			||||
use App\Models\Service; | 
				
			||||
use App\Models\ServicePoint; | 
				
			||||
use App\Models\Setting; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
use App\Models\User; | 
				
			||||
use Illuminate\Support\Facades\Auth; | 
				
			||||
use Illuminate\Support\Facades\Session; | 
				
			||||
 | 
				
			||||
class ServiceController extends Controller | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Display a listing of the resource. | 
				
			||||
     * | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
 | 
				
			||||
    protected $view = 'admin.service.'; | 
				
			||||
    protected $redirect = 'admin/services'; | 
				
			||||
 | 
				
			||||
    public function index() | 
				
			||||
    { | 
				
			||||
        $services = Service::orderBy('order_by','ASC'); | 
				
			||||
 | 
				
			||||
        if(\request('name')){ | 
				
			||||
            $key = \request('name'); | 
				
			||||
            $services = $services->where('name','like','%'.$key.'%'); | 
				
			||||
        } | 
				
			||||
        if(\request('status')){ | 
				
			||||
            $key = \request('status'); | 
				
			||||
            $services = $services->where('status',$key); | 
				
			||||
        } | 
				
			||||
        $services = $services->paginate(config('custom.per_page')); | 
				
			||||
        return view($this->view.'index',compact('services')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Show the form for creating a new resource. | 
				
			||||
     * | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function create() | 
				
			||||
    { | 
				
			||||
        return view($this->view.'create'); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Store a newly created resource in storage. | 
				
			||||
     * | 
				
			||||
     * @param  \Illuminate\Http\Request  $request | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function store(Request $request) | 
				
			||||
    { | 
				
			||||
         | 
				
			||||
        $this->validate(\request(),[ | 
				
			||||
            'name' => 'required', | 
				
			||||
            'seo_title' => 'required', | 
				
			||||
            'short_description' => 'required', | 
				
			||||
            'keywords'=>'required', | 
				
			||||
            'icon' => 'file|mimes:jpeg,png,jpg,svg,' | 
				
			||||
        ]); | 
				
			||||
        $service = new Service(); | 
				
			||||
        $service->name = \request('name'); | 
				
			||||
        // $service->image = \request('image'); | 
				
			||||
        // $service->image_title = \request('image_title'); | 
				
			||||
        // $service->top_description = \request('top_description'); | 
				
			||||
        // $service->image_description = \request('image_description'); | 
				
			||||
        // $service->bottom_description = \request('bottom_description'); | 
				
			||||
        $service->seo_description = strip_tags(\request('seo_description')); | 
				
			||||
        $service->seo_title = \request('seo_title'); | 
				
			||||
        $service->keywords = \request('keywords'); | 
				
			||||
        // $service->icon = \request('icon'); | 
				
			||||
        $service->meta_keywords = strip_tags(\request('meta_keywords')); | 
				
			||||
        $service->short_description = strip_tags(\request('short_description')); | 
				
			||||
        // $service->point_title = \request('point_title'); | 
				
			||||
        // $service->description_title = \request('description_title'); | 
				
			||||
        $service->status = \request('status'); | 
				
			||||
        $service->order_by = \request('order_by'); | 
				
			||||
        // $service->image_alt = \request('image_alt'); | 
				
			||||
        $service->slug = Setting::create_slug(\request('seo_title')); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        if($request->hasFile('icon')){ | 
				
			||||
            $extension = \request()->file('icon')->getClientOriginalExtension(); | 
				
			||||
            $image_folder_type = array_search('service',config('custom.image_folders')); //for image saved in folder | 
				
			||||
             | 
				
			||||
            $count = rand(100,999); | 
				
			||||
             | 
				
			||||
            $out_put_path = User::save_image(\request('icon'),$extension,$count,$image_folder_type); | 
				
			||||
            is_array($out_put_path) ? $service->icon = $out_put_path[0] : $service->icon = $out_put_path; | 
				
			||||
        } | 
				
			||||
        if($request->hasFile('image')){ | 
				
			||||
            $extension = \request()->file('image')->getClientOriginalExtension(); | 
				
			||||
            $image_folder_type = array_search('service',config('custom.image_folders')); //for image saved in folder | 
				
			||||
             | 
				
			||||
            $count = rand(100,999); | 
				
			||||
             | 
				
			||||
            $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); | 
				
			||||
            is_array($out_put_path) ? $service->image = $out_put_path[0] : $service->image = $out_put_path; | 
				
			||||
        } | 
				
			||||
        if($request->hasFile('banner_image')){ | 
				
			||||
            $extension = \request()->file('banner_image')->getClientOriginalExtension(); | 
				
			||||
            $image_folder_type = array_search('service',config('custom.image_folders')); //for image saved in folder | 
				
			||||
             | 
				
			||||
            $count = rand(100,999); | 
				
			||||
             | 
				
			||||
            $out_put_path = User::save_image(\request('banner_image'),$extension,$count,$image_folder_type); | 
				
			||||
            is_array($out_put_path) ? $service->banner_image = $out_put_path[0] : $service->banner_image = $out_put_path; | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        if($service->save()){ | 
				
			||||
            // $points = $request->points; | 
				
			||||
            // foreach($points as $point){ | 
				
			||||
            //     $service_point = new ServicePoint(); | 
				
			||||
            //     $service_point->service_id = $service->id; | 
				
			||||
            //     $service_point->point = $point; | 
				
			||||
            //     $service_point->save(); | 
				
			||||
            // } | 
				
			||||
            Session::flash('success','Service has been created!'); | 
				
			||||
            return redirect($this->redirect); | 
				
			||||
 | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Display the specified resource. | 
				
			||||
     * | 
				
			||||
     * @param  int  $id | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function show($id) | 
				
			||||
    { | 
				
			||||
        $service = new Service(); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        $service = $service->findorfail($id); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        return view($this->view . 'show', compact('service')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Show the form for editing the specified resource. | 
				
			||||
     * | 
				
			||||
     * @param  int  $id | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function edit($id) | 
				
			||||
    { | 
				
			||||
        $service = new Service(); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        $service = $service->findorfail($id); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        return view($this->view . 'edit', compact('service')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Update the specified resource in storage. | 
				
			||||
     * | 
				
			||||
     * @param  \Illuminate\Http\Request  $request | 
				
			||||
     * @param  int  $id | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function update(Request $request, $id) | 
				
			||||
    { | 
				
			||||
        $this->validate(\request(),[ | 
				
			||||
 | 
				
			||||
            'name' => 'required', | 
				
			||||
            'short_description' => 'required', | 
				
			||||
            'seo_title' => 'required', | 
				
			||||
            'keywords'=>'required', | 
				
			||||
 | 
				
			||||
        ]); | 
				
			||||
        $service = new Service(); | 
				
			||||
        $service = $service->findorfail($id); | 
				
			||||
        $service->name = \request('name'); | 
				
			||||
        $service->short_description = \request('short_description'); | 
				
			||||
        $service->seo_description = \request('seo_description'); | 
				
			||||
        $service->seo_title = \request('seo_title'); | 
				
			||||
        $service->keywords = \request('keywords'); | 
				
			||||
       | 
				
			||||
        $service->meta_keywords = \request('meta_keywords'); | 
				
			||||
        $service->status = \request('status'); | 
				
			||||
        $service->order_by = \request('order_by'); | 
				
			||||
        $service->slug = Setting::create_slug(\request('seo_title')); | 
				
			||||
 | 
				
			||||
        if($request->hasFile('icon')){ | 
				
			||||
 | 
				
			||||
            $extension = \request()->file('icon')->getClientOriginalExtension(); | 
				
			||||
 | 
				
			||||
            $image_folder_type = array_search('service',config('custom.image_folders')); //for image saved in folder | 
				
			||||
            $count = rand(100,999); | 
				
			||||
            $out_put_path = User::save_image(\request('icon'),$extension,$count,$image_folder_type); | 
				
			||||
             | 
				
			||||
 | 
				
			||||
            if (is_file(public_path().'/'.$service->icon) && file_exists(public_path().'/'.$service->icon)){ | 
				
			||||
                unlink(public_path().'/'.$service->icon); | 
				
			||||
            } | 
				
			||||
           is_array($out_put_path) ? $service->icon = $out_put_path[0] : $service->icon = $out_put_path; | 
				
			||||
             | 
				
			||||
             | 
				
			||||
        } | 
				
			||||
        if($request->hasFile('image')){ | 
				
			||||
 | 
				
			||||
            $extension = \request()->file('image')->getClientOriginalExtension(); | 
				
			||||
 | 
				
			||||
            $image_folder_type = array_search('service',config('custom.image_folders')); //for image saved in folder | 
				
			||||
            $count = rand(100,999); | 
				
			||||
            $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); | 
				
			||||
             | 
				
			||||
 | 
				
			||||
            if (is_file(public_path().'/'.$service->image) && file_exists(public_path().'/'.$service->image)){ | 
				
			||||
                unlink(public_path().'/'.$service->image); | 
				
			||||
            } | 
				
			||||
           is_array($out_put_path) ? $service->image = $out_put_path[0] : $service->image = $out_put_path; | 
				
			||||
             | 
				
			||||
             | 
				
			||||
        } | 
				
			||||
        if($request->hasFile('banner_image')){ | 
				
			||||
 | 
				
			||||
            $extension = \request()->file('banner_image')->getClientOriginalExtension(); | 
				
			||||
 | 
				
			||||
            $image_folder_type = array_search('service',config('custom.image_folders')); //for image saved in folder | 
				
			||||
            $count = rand(100,999); | 
				
			||||
            $out_put_path = User::save_image(\request('banner_image'),$extension,$count,$image_folder_type); | 
				
			||||
             | 
				
			||||
 | 
				
			||||
            if (is_file(public_path().'/'.$service->banner_image) && file_exists(public_path().'/'.$service->banner_image)){ | 
				
			||||
                unlink(public_path().'/'.$service->banner_image); | 
				
			||||
            } | 
				
			||||
           is_array($out_put_path) ? $service->banner_image = $out_put_path[0] : $service->banner_image = $out_put_path; | 
				
			||||
             | 
				
			||||
             | 
				
			||||
        } | 
				
			||||
        if($service->update()){ | 
				
			||||
            Session::flash('success','Service has been successfully updated!'); | 
				
			||||
            return redirect($this->redirect); | 
				
			||||
            // $service_point = $service->service_point(); | 
				
			||||
            // $service_point->delete(); | 
				
			||||
            // $points = $request->points; | 
				
			||||
            // foreach($points as $point){ | 
				
			||||
            //     $service_point = new ServicePoint(); | 
				
			||||
            //     $service_point->service_id = $service->id; | 
				
			||||
            //     $service_point->point = $point; | 
				
			||||
            //     $service_point->save(); | 
				
			||||
             | 
				
			||||
 | 
				
			||||
             | 
				
			||||
 | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Remove the specified resource from storage. | 
				
			||||
     * | 
				
			||||
     * @param  int  $id | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function delete($id) | 
				
			||||
    { | 
				
			||||
        $setting=Service::findorfail($id); | 
				
			||||
        if (is_file(public_path().'/'.$setting->icon) && file_exists(public_path().'/'.$setting->icon)){ | 
				
			||||
            unlink(public_path().'/'.$setting->icon); | 
				
			||||
        } | 
				
			||||
        $setting->delete(); | 
				
			||||
        Session::flash('success','Service has been sucessfully deleted!'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
        //dd("here"); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
 | 
				
			||||
    public function service_point($service_point_id){ | 
				
			||||
        if(Auth::user()){ | 
				
			||||
            $setting = ServicePoint::findorfail($service_point_id); | 
				
			||||
            $setting->delete(); | 
				
			||||
            return response()->json(['service_point_id' => $service_point_id]); | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,66 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers\Admin; | 
				
			||||
 | 
				
			||||
use App\Http\Controllers\Controller; | 
				
			||||
use App\Models\Service; | 
				
			||||
use App\Models\ServiceOld; | 
				
			||||
use App\Models\ServiceFaq; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
use Illuminate\Support\Facades\Session; | 
				
			||||
 | 
				
			||||
class ServiceFaqController extends Controller | 
				
			||||
{ | 
				
			||||
    protected $view= 'admin.service_faq.'; | 
				
			||||
    protected $redirect = 'admin/service_faqs'; | 
				
			||||
 | 
				
			||||
 | 
				
			||||
    public function index(){ | 
				
			||||
        $settings = ServiceFaq::paginate(config('custom.per_page')); | 
				
			||||
        return view($this->view.'index',compact('settings')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function create(){ | 
				
			||||
        $settings = Service::get(); | 
				
			||||
        return view($this->view.'create',compact('settings')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function store(Request $request){ | 
				
			||||
        $this->validate(\request(), [ | 
				
			||||
            'question' =>'required|string', | 
				
			||||
            'answer'=>'required', | 
				
			||||
            'status' => 'required', | 
				
			||||
 | 
				
			||||
        ]); | 
				
			||||
 | 
				
			||||
        $requestData = $request->all(); | 
				
			||||
        $setting = ServiceFaq::create($requestData); | 
				
			||||
        Session::flash('success','ServiceFAQ is created'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function edit($id){ | 
				
			||||
        $setting = ServiceFaq::findorfail($id); | 
				
			||||
        $services = Service::all(); | 
				
			||||
        return view($this->view.'edit',compact('setting'),compact('services')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function update(Request $request, $id){ | 
				
			||||
 | 
				
			||||
        $setting =ServiceFaq::findorfail($id); | 
				
			||||
        $this->validate(\request(), [ | 
				
			||||
            'question' =>'required|string', | 
				
			||||
            'answer'=>'required', | 
				
			||||
            'status' => 'required', | 
				
			||||
 | 
				
			||||
        ]); | 
				
			||||
 | 
				
			||||
        $requestData = $request->all(); | 
				
			||||
        $setting->fill($requestData); | 
				
			||||
        $setting->save(); | 
				
			||||
        Session::flash('success','CourseFAQ is Updated'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,294 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers\Admin; | 
				
			||||
 | 
				
			||||
use App\Http\Controllers\Controller; | 
				
			||||
use App\Models\Service; | 
				
			||||
use App\Models\ServiceSection; | 
				
			||||
use App\Models\ServiceSectionPoint; | 
				
			||||
use App\Models\Setting; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
use App\Models\User; | 
				
			||||
use Illuminate\Support\Facades\Auth; | 
				
			||||
use Illuminate\Support\Facades\Session; | 
				
			||||
 | 
				
			||||
class ServiceSectionController extends Controller | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Display a listing of the resource. | 
				
			||||
     * | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
 | 
				
			||||
    protected $view = 'admin.service_section.'; | 
				
			||||
    protected $redirect = 'admin/services/{id}/sections'; | 
				
			||||
 | 
				
			||||
    public function index($id) | 
				
			||||
    { | 
				
			||||
        $service_name = Service::findorfail($id)->name; | 
				
			||||
        $service_section = ServiceSection::where('service_id',$id); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        // if(\request('name')){ | 
				
			||||
        //     $key = \request('name'); | 
				
			||||
        //     $services = $services->where('name','like','%'.$key.'%'); | 
				
			||||
        // } | 
				
			||||
        // if(\request('status')){ | 
				
			||||
        //     $key = \request('status'); | 
				
			||||
        //     $services = $services->where('status',$key); | 
				
			||||
        // } | 
				
			||||
        $service_sections = $service_section->paginate(config('custom.per_page')); | 
				
			||||
        return view($this->view.'index',compact('service_sections','service_name','id')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Show the form for creating a new resource. | 
				
			||||
     * | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function create($id) | 
				
			||||
    { | 
				
			||||
        $service_name = Service::findorfail($id)->name; | 
				
			||||
        return view($this->view.'create',compact('service_name','id')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Store a newly created resource in storage. | 
				
			||||
     * | 
				
			||||
     * @param  \Illuminate\Http\Request  $request | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function store(Request $request,$id) | 
				
			||||
    { | 
				
			||||
         | 
				
			||||
        | 
				
			||||
        $this->validate(\request(),[ | 
				
			||||
             | 
				
			||||
            'title' => 'required', | 
				
			||||
            'status' => 'required', | 
				
			||||
            'order_by' => 'required' | 
				
			||||
            | 
				
			||||
        ]); | 
				
			||||
        $service_section = new ServiceSection(); | 
				
			||||
 | 
				
			||||
        $service_section->title = \request('title'); | 
				
			||||
        $service_section->sub_title = \request('sub_title'); | 
				
			||||
        $service_section->description = strip_tags(\request('description')); | 
				
			||||
        $service_section->sub_description = strip_tags(\request('sub_description')); | 
				
			||||
        $service_section->service_id = $id; | 
				
			||||
        $service_section->status = \request('status'); | 
				
			||||
        $service_section->order_by = \request('order_by'); | 
				
			||||
        // $service->image_alt = \request('image_alt'); | 
				
			||||
        // $service->slug = Setting::create_slug(\request('seo_title')); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        if($request->hasFile('image')){ | 
				
			||||
            $extension = \request()->file('image')->getClientOriginalExtension(); | 
				
			||||
            $image_folder_type = array_search('service',config('custom.image_folders')); //for image saved in folder | 
				
			||||
            // dd($image_folder_type); | 
				
			||||
            $count = rand(100,999); | 
				
			||||
            $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); | 
				
			||||
                $image_path = $out_put_path[0]; | 
				
			||||
                $service_section->image = $image_path; | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        if($service_section->save()){ | 
				
			||||
            $points = $request->points; | 
				
			||||
            $point_descriptions = $request->point_descriptions ?? []; | 
				
			||||
            $icons = $request->icons ?? []; | 
				
			||||
             | 
				
			||||
            if($points[0] != null){ | 
				
			||||
                | 
				
			||||
            foreach($points as $key => $point){ | 
				
			||||
 | 
				
			||||
                $service_section_point = new ServiceSectionPoint(); | 
				
			||||
                 | 
				
			||||
                $service_section_point->service_section_id = $service_section->id; | 
				
			||||
                if(array_key_exists($key,$point_descriptions)){ | 
				
			||||
                $service_section_point->point_description = $point_descriptions[$key]; | 
				
			||||
                } | 
				
			||||
                if(array_key_exists($key,$icons)){ | 
				
			||||
                $extension = $icons[$key]->getClientOriginalExtension(); | 
				
			||||
                $image_folder_type = array_search('service',config('custom.image_folders')); //for image saved in folder | 
				
			||||
             | 
				
			||||
                $count = rand(100,999); | 
				
			||||
             | 
				
			||||
                $out_put_path = User::save_image($icons[$key],$extension,$count,$image_folder_type); | 
				
			||||
                is_array($out_put_path) ? $service_section_point->icon = $out_put_path[0] : $service_section_point->icon = $out_put_path; | 
				
			||||
                // $service_section_point->icon = $points_descriptions[$key]; | 
				
			||||
               } | 
				
			||||
                $service_section_point->point = $point; | 
				
			||||
                $service_section_point->save(); | 
				
			||||
            } | 
				
			||||
            } | 
				
			||||
            Session::flash('success','Service Section has has been created!'); | 
				
			||||
            return redirect('admin/services/'.$id.'/sections'); | 
				
			||||
 | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Display the specified resource. | 
				
			||||
     * | 
				
			||||
     * @param  int  $id | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function show($id,$secId) | 
				
			||||
    { | 
				
			||||
         | 
				
			||||
         | 
				
			||||
        // $service = new Service(); | 
				
			||||
        // $service_section = new ServiceSection(); | 
				
			||||
        $service = Service::findorfail($id); | 
				
			||||
 | 
				
			||||
        $service_section = ServiceSection::findorfail($secId); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        return view($this->view . 'show', compact('service','service_section')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Show the form for editing the specified resource. | 
				
			||||
     * | 
				
			||||
     * @param  int  $id | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function edit($id,$secId) | 
				
			||||
    { | 
				
			||||
        $service = new Service(); | 
				
			||||
        $service_section = new ServiceSection(); | 
				
			||||
        $service = $service->findorfail($id); | 
				
			||||
        $service_section = $service_section->findorfail($secId); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        return view($this->view . 'edit', compact('service','service_section')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Update the specified resource in storage. | 
				
			||||
     * | 
				
			||||
     * @param  \Illuminate\Http\Request  $request | 
				
			||||
     * @param  int  $id | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function update(Request $request, $id, $secId) | 
				
			||||
    { | 
				
			||||
        $this->validate(\request(),[ | 
				
			||||
            'title' => 'required', | 
				
			||||
            'status' => 'required', | 
				
			||||
            'order_by' => 'required' | 
				
			||||
        ]); | 
				
			||||
        $service_section = ServiceSection::findOrFail($secId); | 
				
			||||
        $service_section->title = \request('title'); | 
				
			||||
        $service_section->sub_title = \request('sub_title'); | 
				
			||||
        $service_section->description = strip_tags(\request('description')); | 
				
			||||
        $service_section->sub_description = strip_tags(\request('sub_description')); | 
				
			||||
        $service_section->service_id = $id; | 
				
			||||
        $service_section->status = \request('status'); | 
				
			||||
        $service_section->order_by = \request('order_by'); | 
				
			||||
 | 
				
			||||
        if($request->hasFile('image')){ | 
				
			||||
            $extension = \request()->file('image')->getClientOriginalExtension(); | 
				
			||||
            $image_folder_type = array_search('service',config('custom.image_folders')); //for image saved in folder | 
				
			||||
            $count = rand(100,999); | 
				
			||||
            $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); | 
				
			||||
            $image_path = $out_put_path[0]; | 
				
			||||
            if (is_file(public_path().'/'.$service_section->image) && file_exists(public_path().'/'.$service_section->image)){ | 
				
			||||
                unlink(public_path().'/'.$service_section->image); | 
				
			||||
            } | 
				
			||||
            $service_section->image = $image_path; | 
				
			||||
        } | 
				
			||||
        if($service_section->update()){ | 
				
			||||
            $points = $request->points; | 
				
			||||
            $point_ids = $request->point_ids; | 
				
			||||
            $point_descriptions = $request->point_descriptions ?? []; | 
				
			||||
            $icons = $request->icons ?? []; | 
				
			||||
             | 
				
			||||
             | 
				
			||||
            if($points != null && $point_ids != null){ | 
				
			||||
               foreach($request['point_ids'] as $key => $pid){ | 
				
			||||
                $service_section_point = new ServiceSectionPoint(); | 
				
			||||
                $service_section_point = $service_section_point->findorfail($pid); | 
				
			||||
                // $service_section_point =  ServiceSectionPoint::find($id); | 
				
			||||
 | 
				
			||||
                    if(array_key_exists($key,$point_descriptions)){ | 
				
			||||
                         $service_section_point->point_description = $point_descriptions[$key]; | 
				
			||||
                    } | 
				
			||||
                    if(array_key_exists($key,$icons)){ | 
				
			||||
                        $extension = $icons[$key]->getClientOriginalExtension(); | 
				
			||||
                        $image_folder_type = array_search('service',config('custom.image_folders')); //for image saved in folder | 
				
			||||
                     | 
				
			||||
                        $count = rand(100,999); | 
				
			||||
                     | 
				
			||||
                        $out_put_path = User::save_image($icons[$key],$extension,$count,$image_folder_type); | 
				
			||||
                        is_array($out_put_path) ? $service_section_point->icon = $out_put_path[0] : $service_section_point->icon = $out_put_path; | 
				
			||||
                         // $service_section_point->icon = $points_descriptions[$key]; | 
				
			||||
                    } | 
				
			||||
                   $service_section_point->point = $points[$key]; | 
				
			||||
                   $service_section_point->update(); | 
				
			||||
 | 
				
			||||
                } | 
				
			||||
            }     | 
				
			||||
            else{ | 
				
			||||
                // foreach($points as $key => $point){ | 
				
			||||
                //     $service_section_point = new ServiceSectionPoint(); | 
				
			||||
                //     $service_section_point->service_section_id = $service_section->id; | 
				
			||||
                //     $service_section_point->point = $point; | 
				
			||||
                //     $service_section_point->save(); | 
				
			||||
                // } | 
				
			||||
            } | 
				
			||||
                // $service_point = $service_section->service_section_point(); | 
				
			||||
                // $service_point->delete(); | 
				
			||||
            // foreach($points as $key => $point){ | 
				
			||||
 | 
				
			||||
            //     $service_section_point = new ServiceSectionPoint(); | 
				
			||||
            //     $service_section_point->service_section_id = $service_section->id; | 
				
			||||
            //     if(array_key_exists($key,$point_descriptions)){ | 
				
			||||
            //     $service_section_point->point_description = $point_descriptions[$key]; | 
				
			||||
            //     } | 
				
			||||
            //     if(array_key_exists($key,$icons)){ | 
				
			||||
            //     $extension = $icons[$key]->getClientOriginalExtension(); | 
				
			||||
            //     $image_folder_type = array_search('service',config('custom.image_folders')); //for image saved in folder | 
				
			||||
             | 
				
			||||
            //     $count = rand(100,999); | 
				
			||||
             | 
				
			||||
            //     $out_put_path = User::save_image($icons[$key],$extension,$count,$image_folder_type); | 
				
			||||
            //     is_array($out_put_path) ? $service_section_point->icon = $out_put_path[0] : $service_section_point->icon = $out_put_path; | 
				
			||||
            //     // $service_section_point->icon = $points_descriptions[$key]; | 
				
			||||
            //    } | 
				
			||||
            //     $service_section_point->point = $point; | 
				
			||||
            //     $service_section_point->update(); | 
				
			||||
            // } | 
				
			||||
            Session::flash('success','Service Section has been successfully updated!'); | 
				
			||||
            return redirect('admin/services/'.$id.'/sections'); | 
				
			||||
 | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Remove the specified resource from storage. | 
				
			||||
     * | 
				
			||||
     * @param  int  $id | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function destroy($id) | 
				
			||||
    { | 
				
			||||
        // | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function service_point($service_point_id){ | 
				
			||||
        if(Auth::user()){ | 
				
			||||
            $setting = ServiceSectionPoint::findorfail($service_point_id); | 
				
			||||
            $setting->delete(); | 
				
			||||
            return response()->json(['service_point_id' => $service_point_id]); | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,184 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers\Admin; | 
				
			||||
 | 
				
			||||
use App\Http\Controllers\Controller; | 
				
			||||
use App\Http\Resources\SettingResource; | 
				
			||||
use App\Models\Setting; | 
				
			||||
use App\Models\SettingImageAlt; | 
				
			||||
use App\Models\User; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
use Illuminate\Support\Facades\Session; | 
				
			||||
 | 
				
			||||
class SettingController extends Controller | 
				
			||||
{ | 
				
			||||
 | 
				
			||||
    protected $view = 'admin.setting.'; | 
				
			||||
    protected $redirect = 'admin/settings'; | 
				
			||||
 | 
				
			||||
    public function index() | 
				
			||||
    { | 
				
			||||
        $settings = Setting::orderBy('id','asc'); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        if(\request('name')){ | 
				
			||||
            $key = \request('name'); | 
				
			||||
            $settings = $settings->where('key','like','%'.$key.'%'); | 
				
			||||
        } | 
				
			||||
        if(\request('status')){ | 
				
			||||
            $key = \request('status'); | 
				
			||||
            $settings = $settings->where('status',$key); | 
				
			||||
        } | 
				
			||||
        $settings = $settings->paginate(config('custom.per_page')); | 
				
			||||
      return view($this->view.'index',compact('settings')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function create() | 
				
			||||
    { | 
				
			||||
        return view($this->view.'create'); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function store(Request $request) | 
				
			||||
    { | 
				
			||||
 | 
				
			||||
         | 
				
			||||
 | 
				
			||||
        $this->validate(\request(),[ | 
				
			||||
            'type' => 'required', | 
				
			||||
            'key' => 'required', | 
				
			||||
            'value' => 'required', | 
				
			||||
            'status' => 'required' | 
				
			||||
        ]); | 
				
			||||
 | 
				
			||||
        $setting = new Setting(); | 
				
			||||
 | 
				
			||||
        $setting->key = \request('key'); | 
				
			||||
        $setting->type = \request('type'); | 
				
			||||
        $setting->status = \request('status'); | 
				
			||||
        $setting->slug = Setting::create_slug(\request('key')); | 
				
			||||
        // if(request('type') == array_search('Image',config('custom.setting_types'))){ | 
				
			||||
        //     $this->validate($request,[ | 
				
			||||
        //             'value'=>'required|file|mimes:jpeg,png,jpg,pdf' | 
				
			||||
        //         ] | 
				
			||||
        //     ); | 
				
			||||
        // } | 
				
			||||
            if($request->hasFile('value')){ | 
				
			||||
                $extension = \request()->file('value')->getClientOriginalExtension(); | 
				
			||||
                $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); | 
				
			||||
                is_array($out_put_path) ? $image_path = $out_put_path[0] : $image_path = $out_put_path; | 
				
			||||
                $setting->value = $image_path; | 
				
			||||
            } | 
				
			||||
            | 
				
			||||
        else{ | 
				
			||||
            $setting->value = \request('value'); | 
				
			||||
        } | 
				
			||||
        $setting->save(); | 
				
			||||
        if(\request('image_alt')){ | 
				
			||||
            $image_alt = new SettingImageAlt(); | 
				
			||||
            $image_alt->setting_id = $setting->id; | 
				
			||||
            $image_alt->image_alt = \request('image_alt'); | 
				
			||||
            $image_alt->save(); | 
				
			||||
        } | 
				
			||||
        Session::flash('success','Setting has been created!'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function getAll() | 
				
			||||
    { | 
				
			||||
        $settings = Setting::all(); | 
				
			||||
        return SettingResource::collection(Setting::all()); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function getSetting() | 
				
			||||
    { | 
				
			||||
        $slug = \request('slug'); | 
				
			||||
        $setting = Setting::where('slug',$slug)->where('status',1)->first(); | 
				
			||||
        return new SettingResource($setting); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function show($id) | 
				
			||||
    { | 
				
			||||
        $setting = Setting::findOrFail($id); | 
				
			||||
        return view($this->view.'show',compact('setting')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function edit($id) | 
				
			||||
    { | 
				
			||||
        $setting = Setting::findOrFail($id); | 
				
			||||
//        dd(array_search('Image',config('custom.setting_types'))); | 
				
			||||
        return view($this->view.'edit',compact('setting')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function update(Request $request, $id) | 
				
			||||
    { | 
				
			||||
        $this->validate(\request(),[ | 
				
			||||
            'type' => 'required', | 
				
			||||
            'key' => 'required', | 
				
			||||
            'status' => 'required' | 
				
			||||
        ]); | 
				
			||||
        $setting = Setting::findOrFail($id); | 
				
			||||
        $setting->key = \request('key'); | 
				
			||||
        $setting->type = \request('type'); | 
				
			||||
        $setting->status = \request('status'); | 
				
			||||
        $setting->slug = Setting::create_slug(\request('key')); | 
				
			||||
        if(request('type') == array_search('Image',config('custom.setting_types'))){ | 
				
			||||
            if(\request('value')){ | 
				
			||||
                $this->validate($request,[ | 
				
			||||
                        'value'=>'required|file|mimes:jpeg,png,jpg,pdf,mp4' | 
				
			||||
                    ] | 
				
			||||
                ); | 
				
			||||
 | 
				
			||||
                if($request->hasFile('value')){ | 
				
			||||
                    $extension = \request()->file('value')->getClientOriginalExtension(); | 
				
			||||
                    $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); | 
				
			||||
                    is_array($out_put_path) ? $image_path = $out_put_path[0] : $image_path = $out_put_path; | 
				
			||||
                    $setting->value = $image_path; | 
				
			||||
                } | 
				
			||||
            } | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        }else{ | 
				
			||||
            $this->validate($request,[ | 
				
			||||
                    'value'=>'required' | 
				
			||||
                ] | 
				
			||||
            ); | 
				
			||||
            $setting->value = \request('value'); | 
				
			||||
        } | 
				
			||||
        $setting->save(); | 
				
			||||
        if(\request('image_alt')){ | 
				
			||||
            if($setting->setting_alt){ | 
				
			||||
                $image_alt = $setting->setting_alt; | 
				
			||||
                $image_alt->setting_id = $setting->id; | 
				
			||||
                $image_alt->image_alt = \request('image_alt'); | 
				
			||||
                $image_alt->save(); | 
				
			||||
            }else{ | 
				
			||||
                $image_alt = new SettingImageAlt(); | 
				
			||||
                $image_alt->setting_id = $setting->id; | 
				
			||||
                $image_alt->image_alt = \request('image_alt'); | 
				
			||||
                $image_alt->save(); | 
				
			||||
            } | 
				
			||||
        }else{ | 
				
			||||
            if($setting->setting_alt){ | 
				
			||||
                $setting->setting_alt->delete(); | 
				
			||||
            } | 
				
			||||
        } | 
				
			||||
        Session::flash('success','Setting has been created!'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function delete($id) | 
				
			||||
    { | 
				
			||||
        $setting=Setting::findorfail($id); | 
				
			||||
        if (is_file(public_path().'/'.$setting->value) && file_exists(public_path().'/'.$setting->value)){ | 
				
			||||
            unlink(public_path().'/'.$setting->value); | 
				
			||||
        } | 
				
			||||
        $setting->delete(); | 
				
			||||
        Session::flash('success','Setting has been sucessfully deleted!'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
        //dd("here"); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,184 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers\Admin; | 
				
			||||
 | 
				
			||||
use App\Http\Controllers\Controller; | 
				
			||||
use App\Http\Resources\SliderResource; | 
				
			||||
use App\Models\Slider; | 
				
			||||
use App\Models\User; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
use Illuminate\Support\Facades\Session; | 
				
			||||
 | 
				
			||||
class SliderController extends Controller | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Display a listing of the resource. | 
				
			||||
     * | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
 | 
				
			||||
    protected $view = 'admin.slider.'; | 
				
			||||
    protected $redirect = 'admin/sliders'; | 
				
			||||
    public function index() | 
				
			||||
    { | 
				
			||||
        $settings = Slider::orderBy('id','DESC'); | 
				
			||||
        if(\request('title1')){ | 
				
			||||
            $key = \request('title1'); | 
				
			||||
            $settings = $settings->where('title1','like','%'.$key.'%'); | 
				
			||||
        } | 
				
			||||
        if(\request('status')){ | 
				
			||||
            $key = \request('status'); | 
				
			||||
            $settings = $settings->where('status',$key); | 
				
			||||
        } | 
				
			||||
        $settings = $settings->paginate(config('custom.per_page')); | 
				
			||||
        return view($this->view.'index',compact('settings')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Show the form for creating a new resource. | 
				
			||||
     * | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function create() | 
				
			||||
    { | 
				
			||||
        return view($this->view.'create'); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Store a newly created resource in storage. | 
				
			||||
     * | 
				
			||||
     * @param  \Illuminate\Http\Request  $request | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function store(Request $request) | 
				
			||||
    { | 
				
			||||
        $this->validate(\request(),[ | 
				
			||||
            'title1' => 'required', | 
				
			||||
             'title2' => 'required', | 
				
			||||
           'description' => 'required', | 
				
			||||
            // 'image' => 'required|file|mimes:jpeg,png,jpg', | 
				
			||||
            'status' => 'required' | 
				
			||||
        ]); | 
				
			||||
 | 
				
			||||
        $setting = new Slider(); | 
				
			||||
 | 
				
			||||
        $setting->title1 = \request('title1'); | 
				
			||||
        $setting->title2 = \request('title2'); | 
				
			||||
        $setting->description = \request('description'); | 
				
			||||
        $setting->status = \request('status'); | 
				
			||||
        $setting->link = \request('link'); | 
				
			||||
        $setting->image_alt = \request('image_alt'); | 
				
			||||
        if($request->hasFile('image')){ | 
				
			||||
                $extension = \request()->file('image')->getClientOriginalExtension(); | 
				
			||||
                $image_folder_type = array_search('slider',config('custom.image_folders')); //for image saved in folder | 
				
			||||
                $count = rand(100,999); | 
				
			||||
                $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); | 
				
			||||
                if($extension == "jpeg" || $extension == "jpg" || $extension == "png"){ | 
				
			||||
                    $image_path = $out_put_path[0]; | 
				
			||||
                    $setting->image = $image_path; | 
				
			||||
//                    $setting->doc_name = $out_put_path[2]; | 
				
			||||
                } | 
				
			||||
            } | 
				
			||||
 | 
				
			||||
        $setting->save(); | 
				
			||||
        Session::flash('success','Slider has been created!'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Display the specified resource. | 
				
			||||
     * | 
				
			||||
     * @param  int  $id | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function show($id) | 
				
			||||
    { | 
				
			||||
        // | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Show the form for editing the specified resource. | 
				
			||||
     * | 
				
			||||
     * @param  int  $id | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function edit($id) | 
				
			||||
    { | 
				
			||||
        $setting = Slider::findorfail($id); | 
				
			||||
      return view($this->view.'edit',compact('setting')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Update the specified resource in storage. | 
				
			||||
     * | 
				
			||||
     * @param  \Illuminate\Http\Request  $request | 
				
			||||
     * @param  int  $id | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function update(Request $request, $id) | 
				
			||||
    { | 
				
			||||
        $setting=Slider::findorfail($id); | 
				
			||||
 | 
				
			||||
        $this->validate(\request(),[ | 
				
			||||
            'title1' => 'required', | 
				
			||||
             'title2' => 'required', | 
				
			||||
             'description' => 'required', | 
				
			||||
            // 'image' => 'file|mimes:jpeg,png,jpg', | 
				
			||||
            'status' => 'required' | 
				
			||||
        ]); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        $setting->title1 = \request('title1'); | 
				
			||||
        $setting->title2 = \request('title2'); | 
				
			||||
        $setting->description = \request('description'); | 
				
			||||
        $setting->status = \request('status'); | 
				
			||||
        $setting->link = \request('link'); | 
				
			||||
        $setting->image_alt = \request('image_alt'); | 
				
			||||
        if($request->hasFile('image')){ | 
				
			||||
            $extension = \request()->file('image')->getClientOriginalExtension(); | 
				
			||||
            $image_folder_type = array_search('slider',config('custom.image_folders')); //for image saved in folder | 
				
			||||
            $count = rand(100,999); | 
				
			||||
            $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); | 
				
			||||
             | 
				
			||||
            $image_path = $out_put_path[0]; | 
				
			||||
            if (is_file(public_path().'/'.$setting->image) && file_exists(public_path().'/'.$setting->image)){ | 
				
			||||
                unlink(public_path().'/'.$setting->image); | 
				
			||||
            } | 
				
			||||
            if(isset($image_path)){ | 
				
			||||
                $setting->image = $image_path; | 
				
			||||
 | 
				
			||||
            } | 
				
			||||
             | 
				
			||||
//                    $setting->doc_name = $out_put_path[2]; | 
				
			||||
        } | 
				
			||||
//        $requestData = $request->all(); | 
				
			||||
//        $setting->fill($requestData); | 
				
			||||
        $setting->update(); | 
				
			||||
        Session::flash('success','Slider has been Updated!'); | 
				
			||||
      return redirect($this->redirect); | 
				
			||||
 } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Remove the specified resource from storage. | 
				
			||||
     * | 
				
			||||
     * @param  int  $id | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function destroy($id) | 
				
			||||
    { | 
				
			||||
        $slider=Slider::findorfail($id); | 
				
			||||
        if (is_file(public_path().'/'.$slider->image) && file_exists(public_path().'/'.$slider->image)){ | 
				
			||||
            unlink(public_path().'/'.$slider->image); | 
				
			||||
        } | 
				
			||||
        $slider->delete(); | 
				
			||||
        Session::flash('success','Slider has been sucessfully deleted!'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function getSliders(){ | 
				
			||||
 | 
				
			||||
        $settings = Slider::where('status',1)->get(); | 
				
			||||
        // return SliderResource::collection($settings); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,98 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers\Admin; | 
				
			||||
 | 
				
			||||
use App\Http\Controllers\Controller; | 
				
			||||
use App\Models\SubOffice; | 
				
			||||
use App\Models\User; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
use Illuminate\Support\Facades\Session; | 
				
			||||
 | 
				
			||||
class SubOfficeController extends Controller | 
				
			||||
{ | 
				
			||||
    protected $view='admin.sub_office.'; | 
				
			||||
    protected $redirect='admin/sub_offices'; | 
				
			||||
    public function index(){ | 
				
			||||
        $settings = SubOffice::paginate(config('custom.per_page')); | 
				
			||||
        return view($this->view.'index',compact('settings')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function create(){ | 
				
			||||
 | 
				
			||||
        return view($this->view.'create'); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function store(Request $request){ | 
				
			||||
 | 
				
			||||
            $this->validate(\request(),[ | 
				
			||||
                'name'=>'required|string', | 
				
			||||
                'image' => 'required|file|mimes:jpeg,png,jpg,pdf', | 
				
			||||
                'email'=>'required', | 
				
			||||
                'latitude' => 'required', | 
				
			||||
                'longitude' => 'required', | 
				
			||||
                'contact_no'=>'required' | 
				
			||||
            ]); | 
				
			||||
 | 
				
			||||
                if($request->hasFile('image')){ | 
				
			||||
                    $extension = \request()->file('image')->getClientOriginalExtension(); | 
				
			||||
                    $image_folder_type = array_search('sub_office',config('custom.image_folders')); //for image saved in folder | 
				
			||||
                    $count = rand(100,999); | 
				
			||||
                    $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); | 
				
			||||
                    $image_path1 = $out_put_path[0]; | 
				
			||||
                } | 
				
			||||
       $requestData=$request->all(); | 
				
			||||
        if(isset($image_path1)){ | 
				
			||||
            $requestData['image'] = $image_path1; | 
				
			||||
        } | 
				
			||||
       $setting= SubOffice::create($requestData); | 
				
			||||
       Session::flash('success','Blog is created'); | 
				
			||||
       return redirect($this->redirect); | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function edit($id){ | 
				
			||||
        $setting=SubOffice::findorfail($id); | 
				
			||||
        return view($this->view.'edit',compact('setting')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function update(Request $request , $id){ | 
				
			||||
            $setting= SubOffice::findorfail($id); | 
				
			||||
 | 
				
			||||
                $this->validate(\request(),[ | 
				
			||||
                    'name'=>'required|string', | 
				
			||||
                     'image' => 'file|mimes:jpeg,png,jpg,pdf', | 
				
			||||
                    'email'=>'required', | 
				
			||||
                    'contact_no'=>'required', | 
				
			||||
                    'latitude' => 'required', | 
				
			||||
                    'longitude' => 'required' | 
				
			||||
                ]); | 
				
			||||
 | 
				
			||||
                if($request->hasFile('image')){ | 
				
			||||
                    $extension = \request()->file('image')->getClientOriginalExtension(); | 
				
			||||
                    $image_folder_type = array_search('sub_office',config('custom.image_folders')); //for image saved in folder | 
				
			||||
                    $count = rand(100,999); | 
				
			||||
                    $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); | 
				
			||||
                    $image_path1 = $out_put_path[0]; | 
				
			||||
                } | 
				
			||||
 | 
				
			||||
        $requestData= $request->all(); | 
				
			||||
        if(isset($image_path1)){ | 
				
			||||
            $requestData['image'] = $image_path1; | 
				
			||||
        } | 
				
			||||
        $setting->fill($requestData); | 
				
			||||
        $setting->save(); | 
				
			||||
        Session::flash('success','Suboffice is Updated'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function delete($id){ | 
				
			||||
 | 
				
			||||
        $setting=SubOffice::findorfail($id); | 
				
			||||
        $setting->delete(); | 
				
			||||
        Session::flash('success','Suboffice is deleted !'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,49 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers\Admin; | 
				
			||||
 | 
				
			||||
use App\Http\Controllers\Controller; | 
				
			||||
use App\Models\Subscription; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
use App\Models\User; | 
				
			||||
use Illuminate\Support\Facades\Session; | 
				
			||||
 | 
				
			||||
class SubscriptionController extends Controller | 
				
			||||
{ | 
				
			||||
    protected $view='admin.subscription.'; | 
				
			||||
    protected $redirect='admin/subscriptions'; | 
				
			||||
 | 
				
			||||
    public function index(){ | 
				
			||||
        $subscriptions=Subscription::paginate(config('custom.per_page')); | 
				
			||||
        return view($this->view.'index',compact('subscriptions')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function show($id){ | 
				
			||||
 | 
				
			||||
        $subscription = new Subscription(); | 
				
			||||
        $subscription = $subscription->findorfail($id); | 
				
			||||
        return view($this->view . 'show', compact('subscription')); | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
 | 
				
			||||
     | 
				
			||||
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
     | 
				
			||||
 | 
				
			||||
    public function delete($id){ | 
				
			||||
        $setting=Placement::findorfail($id); | 
				
			||||
        if($setting->delete()){ | 
				
			||||
            if (is_file(public_path().'/'.$setting->image) && file_exists(public_path().'/'.$setting->image)){ | 
				
			||||
                unlink(public_path().'/'.$setting->image); | 
				
			||||
            } | 
				
			||||
        } | 
				
			||||
        Session::flash('success','Placement is deleted !'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
    // | 
				
			||||
} | 
				
			||||
@ -1,93 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers\Admin; | 
				
			||||
 | 
				
			||||
use App\Http\Controllers\Controller; | 
				
			||||
use App\Models\Team; | 
				
			||||
use App\Models\User; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
use Illuminate\Support\Facades\Session; | 
				
			||||
 | 
				
			||||
class TeamController extends Controller | 
				
			||||
{ | 
				
			||||
    // | 
				
			||||
 | 
				
			||||
    protected $view = 'admin.team.'; | 
				
			||||
    protected $return = 'admin/teams'; | 
				
			||||
 | 
				
			||||
    public function index(){ | 
				
			||||
        $settings = Team::paginate(config('custom.per_page')); | 
				
			||||
        return view($this->view.'index',compact('settings')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function create(){ | 
				
			||||
        return view($this->view.'create'); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function edit($id){ | 
				
			||||
        $team = Team::findorfail($id); | 
				
			||||
        return view($this->view.'edit',compact('team')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function store(Request $request){ | 
				
			||||
        //dd($request); | 
				
			||||
        $this->validate(\request(),[ | 
				
			||||
            'team_name'=>'required', | 
				
			||||
            'designation'=>'required', | 
				
			||||
             | 
				
			||||
            'status'=>'required' | 
				
			||||
        ]); | 
				
			||||
 | 
				
			||||
        $requestData =  $request->all(); | 
				
			||||
        if($request->hasFile('image')){ | 
				
			||||
            $extension = \request()->file('image')->getClientOriginalExtension(); | 
				
			||||
            $image_folder_type = array_search('team',config('custom.image_folders')); //for image saved in folder | 
				
			||||
            $count = rand(100,999); | 
				
			||||
            $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); | 
				
			||||
            $image_path1 = $out_put_path[0]; | 
				
			||||
        } | 
				
			||||
        if(isset($image_path1)){ | 
				
			||||
            $requestData['image'] = $image_path1; | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
        Team::create($requestData); | 
				
			||||
        Session::flash('success','Team is created'); | 
				
			||||
        return redirect($this->return); | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function update(Request $request ,$id){ | 
				
			||||
        //dd($request); | 
				
			||||
        $setting = Team::findorfail($id); | 
				
			||||
 | 
				
			||||
        $this->validate(\request(),[ | 
				
			||||
            'team_name'=>'required', | 
				
			||||
            'designation'=>'required', | 
				
			||||
            'status'=>'required', | 
				
			||||
            'image' => 'file|mimes:jpeg,png,jpg' | 
				
			||||
        ]); | 
				
			||||
        if($request->hasFile('image')){ | 
				
			||||
            $extension = \request()->file('image')->getClientOriginalExtension(); | 
				
			||||
            $image_folder_type = array_search('team',config('custom.image_folders')); //for image saved in folder | 
				
			||||
            $count = rand(100,999); | 
				
			||||
            $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); | 
				
			||||
            $image_path1 = $out_put_path[0]; | 
				
			||||
            if (is_file(public_path().'/'.$setting->image) && file_exists(public_path().'/'.$setting->image)){ | 
				
			||||
                unlink(public_path().'/'.$setting->image); | 
				
			||||
            } | 
				
			||||
        } | 
				
			||||
        $requestData = $request->all(); | 
				
			||||
        if(isset($image_path1)){ | 
				
			||||
            $requestData['image'] = $image_path1; | 
				
			||||
        } | 
				
			||||
        $setting->fill($requestData); | 
				
			||||
        $setting->save(); | 
				
			||||
        Session::flash('success','Team is Updated'); | 
				
			||||
        return redirect($this->return); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
     | 
				
			||||
 | 
				
			||||
} | 
				
			||||
@ -1,116 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers\Admin; | 
				
			||||
 | 
				
			||||
use App\Http\Controllers\Controller; | 
				
			||||
use App\Models\Testimonial; | 
				
			||||
use App\Models\Testimonial as Setting; | 
				
			||||
use App\Models\User; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
use Illuminate\Support\Facades\Session; | 
				
			||||
 | 
				
			||||
 | 
				
			||||
class TestimonialController extends Controller | 
				
			||||
{ | 
				
			||||
 | 
				
			||||
    protected $view = 'admin.testimonial.'; | 
				
			||||
    protected $redirect = 'admin/testimonials'; | 
				
			||||
 | 
				
			||||
    public function index() | 
				
			||||
    { | 
				
			||||
        $settings = Testimonial::paginate(config('custom.per_page')); | 
				
			||||
        return view($this->view.'index',compact('settings')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function create() | 
				
			||||
    { | 
				
			||||
        return view($this->view.'create'); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function store(Request $request) | 
				
			||||
    { | 
				
			||||
        $this->validate(\request(),[ | 
				
			||||
             | 
				
			||||
            'heading' =>'required', | 
				
			||||
            // 'title' =>'required', | 
				
			||||
            'image' =>'required|file|mimes:jpeg,png,jpg,pdf', | 
				
			||||
            'review' =>'required', | 
				
			||||
            'author_name' =>'required', | 
				
			||||
            'author_designation' =>'required', | 
				
			||||
            'status' =>'required', | 
				
			||||
            | 
				
			||||
        ]); | 
				
			||||
 | 
				
			||||
        if(\request('image')){ | 
				
			||||
            if($request->hasFile('image')){ | 
				
			||||
                $extension = \request()->file('image')->getClientOriginalExtension(); | 
				
			||||
                $image_folder_type = array_search('testimonial',config('custom.image_folders')); //for image saved in folder | 
				
			||||
                $count = rand(100,999); | 
				
			||||
                $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); | 
				
			||||
                $image_path1 = $out_put_path[0]; | 
				
			||||
            } | 
				
			||||
        } | 
				
			||||
        $requestData = $request->all(); | 
				
			||||
        if(isset($image_path1)){ | 
				
			||||
            $requestData['image'] = $image_path1; | 
				
			||||
        } | 
				
			||||
        $requestData['review'] = strip_tags($request['review']); | 
				
			||||
        Setting::create($requestData); | 
				
			||||
        Session::flash('success','Testimonial is created!'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function edit($id){ | 
				
			||||
        $setting = Testimonial::findorfail($id); | 
				
			||||
        return view($this->view.'edit',compact('setting')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function update(Request $request , $id){ | 
				
			||||
 | 
				
			||||
        $setting = Testimonial::findorfail($id); | 
				
			||||
 | 
				
			||||
        $this->validate(\request(),[ | 
				
			||||
            // 'heading' =>'required', | 
				
			||||
            // 'title' =>'required', | 
				
			||||
//            'image' =>'required|file|mimes:jpeg,png,jpg,pdf', | 
				
			||||
            'review' =>'required', | 
				
			||||
            'author_name' =>'required', | 
				
			||||
            'author_designation' =>'required', | 
				
			||||
            'status' =>'required', | 
				
			||||
        ]); | 
				
			||||
 | 
				
			||||
        if(\request('image')){ | 
				
			||||
            if($request->hasFile('image')){ | 
				
			||||
                $extension = \request()->file('image')->getClientOriginalExtension(); | 
				
			||||
                $image_folder_type = array_search('testimonial',config('custom.image_folders')); //for image saved in folder | 
				
			||||
                $count = rand(100,999); | 
				
			||||
                $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); | 
				
			||||
                $image_path1 = $out_put_path[0]; | 
				
			||||
            } | 
				
			||||
        } | 
				
			||||
        $requestData = $request->all(); | 
				
			||||
        if(isset($image_path1)){ | 
				
			||||
            $requestData['image'] = $image_path1; | 
				
			||||
        } | 
				
			||||
        $requestData['review'] = strip_tags($request['review']); | 
				
			||||
        $setting->fill($requestData); | 
				
			||||
       $setting->save(); | 
				
			||||
        Session::flash('success','Testimonial is Updated!'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function delete($id) | 
				
			||||
    { | 
				
			||||
        $setting=Testimonial::findorfail($id); | 
				
			||||
        if (is_file(public_path().'/'.$setting->image) && file_exists(public_path().'/'.$setting->image)){ | 
				
			||||
            unlink(public_path().'/'.$setting->image); | 
				
			||||
        } | 
				
			||||
        $setting->delete(); | 
				
			||||
        Session::flash('success','Testimonial has been sucessfully deleted!'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
        //dd("here"); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,265 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers\Admin; | 
				
			||||
 | 
				
			||||
use App\Http\Controllers\Controller; | 
				
			||||
use App\Models\VisaService; | 
				
			||||
use App\Models\ServicePoint; | 
				
			||||
use App\Models\Setting; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
use App\Models\User; | 
				
			||||
use Illuminate\Support\Facades\Auth; | 
				
			||||
use Illuminate\Support\Facades\Session; | 
				
			||||
 | 
				
			||||
class VisaServiceController extends Controller | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Display a listing of the resource. | 
				
			||||
     * | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
 | 
				
			||||
    protected $view = 'admin.visa_service.'; | 
				
			||||
    protected $redirect = 'admin/visa_services'; | 
				
			||||
 | 
				
			||||
    public function index() | 
				
			||||
    { | 
				
			||||
        $services = VisaService::orderBy('order_by','ASC'); | 
				
			||||
 | 
				
			||||
        if(\request('name')){ | 
				
			||||
            $key = \request('name'); | 
				
			||||
            $services = $services->where('name','like','%'.$key.'%'); | 
				
			||||
        } | 
				
			||||
        if(\request('status')){ | 
				
			||||
            $key = \request('status'); | 
				
			||||
            $services = $services->where('status',$key); | 
				
			||||
        } | 
				
			||||
        $services = $services->paginate(config('custom.per_page')); | 
				
			||||
        return view($this->view.'index',compact('services')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Show the form for creating a new resource. | 
				
			||||
     * | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function create() | 
				
			||||
    { | 
				
			||||
        return view($this->view.'create'); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Store a newly created resource in storage. | 
				
			||||
     * | 
				
			||||
     * @param  \Illuminate\Http\Request  $request | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function store(Request $request) | 
				
			||||
    { | 
				
			||||
         | 
				
			||||
        $this->validate(\request(),[ | 
				
			||||
            'name' => 'required', | 
				
			||||
            'seo_title' => 'required', | 
				
			||||
            'short_description' => 'required', | 
				
			||||
            'keywords'=>'required', | 
				
			||||
            'icon' => 'file|mimes:jpeg,png,jpg,svg,' | 
				
			||||
        ]); | 
				
			||||
        $service = new VisaService(); | 
				
			||||
        $service->name = \request('name'); | 
				
			||||
        // $service->image = \request('image'); | 
				
			||||
        // $service->image_title = \request('image_title'); | 
				
			||||
        // $service->top_description = \request('top_description'); | 
				
			||||
        // $service->image_description = \request('image_description'); | 
				
			||||
        // $service->bottom_description = \request('bottom_description'); | 
				
			||||
        $service->seo_description = strip_tags(\request('seo_description')); | 
				
			||||
        $service->seo_title = \request('seo_title'); | 
				
			||||
        $service->keywords = \request('keywords'); | 
				
			||||
        // $service->icon = \request('icon'); | 
				
			||||
        $service->meta_keywords = strip_tags(\request('meta_keywords')); | 
				
			||||
        $service->short_description = strip_tags(\request('short_description')); | 
				
			||||
        // $service->point_title = \request('point_title'); | 
				
			||||
        // $service->description_title = \request('description_title'); | 
				
			||||
        $service->status = \request('status'); | 
				
			||||
        $service->order_by = \request('order_by'); | 
				
			||||
        // $service->image_alt = \request('image_alt'); | 
				
			||||
        $service->slug = Setting::create_slug(\request('seo_title')); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        if($request->hasFile('icon')){ | 
				
			||||
            $extension = \request()->file('icon')->getClientOriginalExtension(); | 
				
			||||
            $image_folder_type = array_search('visa_service',config('custom.image_folders')); //for image saved in folder | 
				
			||||
             | 
				
			||||
            $count = rand(100,999); | 
				
			||||
             | 
				
			||||
            $out_put_path = User::save_image(\request('icon'),$extension,$count,$image_folder_type); | 
				
			||||
            is_array($out_put_path) ? $service->icon = $out_put_path[0] : $service->icon = $out_put_path; | 
				
			||||
        } | 
				
			||||
        if($request->hasFile('image')){ | 
				
			||||
            $extension = \request()->file('image')->getClientOriginalExtension(); | 
				
			||||
            $image_folder_type = array_search('visa_service',config('custom.image_folders')); //for image saved in folder | 
				
			||||
             | 
				
			||||
            $count = rand(100,999); | 
				
			||||
             | 
				
			||||
            $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); | 
				
			||||
            is_array($out_put_path) ? $service->image = $out_put_path[0] : $service->image = $out_put_path; | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
        if($service->save()){ | 
				
			||||
            // $points = $request->points; | 
				
			||||
            // foreach($points as $point){ | 
				
			||||
            //     $service_point = new ServicePoint(); | 
				
			||||
            //     $service_point->service_id = $service->id; | 
				
			||||
            //     $service_point->point = $point; | 
				
			||||
            //     $service_point->save(); | 
				
			||||
            // } | 
				
			||||
            Session::flash('success','Visa Service has been created!'); | 
				
			||||
            return redirect($this->redirect); | 
				
			||||
 | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Display the specified resource. | 
				
			||||
     * | 
				
			||||
     * @param  int  $id | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function show($id) | 
				
			||||
    { | 
				
			||||
        $service = new VisaService(); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        $service = $service->findorfail($id); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        return view($this->view . 'show', compact('service')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Show the form for editing the specified resource. | 
				
			||||
     * | 
				
			||||
     * @param  int  $id | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function edit($id) | 
				
			||||
    { | 
				
			||||
        $service = new VisaService(); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        $service = $service->findorfail($id); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        return view($this->view . 'edit', compact('service')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Update the specified resource in storage. | 
				
			||||
     * | 
				
			||||
     * @param  \Illuminate\Http\Request  $request | 
				
			||||
     * @param  int  $id | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function update(Request $request, $id) | 
				
			||||
    { | 
				
			||||
        $this->validate(\request(),[ | 
				
			||||
 | 
				
			||||
            'name' => 'required', | 
				
			||||
            'short_description' => 'required', | 
				
			||||
            'seo_title' => 'required', | 
				
			||||
            'keywords'=>'required', | 
				
			||||
 | 
				
			||||
        ]); | 
				
			||||
        $service = new VisaService(); | 
				
			||||
        $service = $service->findorfail($id); | 
				
			||||
        $service->name = \request('name'); | 
				
			||||
        $service->short_description = \request('short_description'); | 
				
			||||
        $service->seo_description = \request('seo_description'); | 
				
			||||
        $service->seo_title = \request('seo_title'); | 
				
			||||
        $service->keywords = \request('keywords'); | 
				
			||||
       | 
				
			||||
        $service->meta_keywords = \request('meta_keywords'); | 
				
			||||
        $service->status = \request('status'); | 
				
			||||
        $service->order_by = \request('order_by'); | 
				
			||||
        $service->slug = Setting::create_slug(\request('seo_title')); | 
				
			||||
 | 
				
			||||
        if($request->hasFile('icon')){ | 
				
			||||
 | 
				
			||||
            $extension = \request()->file('icon')->getClientOriginalExtension(); | 
				
			||||
 | 
				
			||||
            $image_folder_type = array_search('visa_service',config('custom.image_folders')); //for image saved in folder | 
				
			||||
            $count = rand(100,999); | 
				
			||||
            $out_put_path = User::save_image(\request('icon'),$extension,$count,$image_folder_type); | 
				
			||||
             | 
				
			||||
 | 
				
			||||
            if (is_file(public_path().'/'.$service->icon) && file_exists(public_path().'/'.$service->icon)){ | 
				
			||||
                unlink(public_path().'/'.$service->icon); | 
				
			||||
            } | 
				
			||||
           is_array($out_put_path) ? $service->icon = $out_put_path[0] : $service->icon = $out_put_path; | 
				
			||||
             | 
				
			||||
             | 
				
			||||
        } | 
				
			||||
        if($request->hasFile('image')){ | 
				
			||||
 | 
				
			||||
            $extension = \request()->file('image')->getClientOriginalExtension(); | 
				
			||||
 | 
				
			||||
            $image_folder_type = array_search('visa_service',config('custom.image_folders')); //for image saved in folder | 
				
			||||
            $count = rand(100,999); | 
				
			||||
            $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); | 
				
			||||
             | 
				
			||||
 | 
				
			||||
            if (is_file(public_path().'/'.$service->image) && file_exists(public_path().'/'.$service->image)){ | 
				
			||||
                unlink(public_path().'/'.$service->image); | 
				
			||||
            } | 
				
			||||
           is_array($out_put_path) ? $service->image = $out_put_path[0] : $service->image = $out_put_path; | 
				
			||||
             | 
				
			||||
             | 
				
			||||
        } | 
				
			||||
        if($service->update()){ | 
				
			||||
            Session::flash('success','Visa Service has been successfully updated!'); | 
				
			||||
            return redirect($this->redirect); | 
				
			||||
            // $service_point = $service->service_point(); | 
				
			||||
            // $service_point->delete(); | 
				
			||||
            // $points = $request->points; | 
				
			||||
            // foreach($points as $point){ | 
				
			||||
            //     $service_point = new ServicePoint(); | 
				
			||||
            //     $service_point->service_id = $service->id; | 
				
			||||
            //     $service_point->point = $point; | 
				
			||||
            //     $service_point->save(); | 
				
			||||
             | 
				
			||||
 | 
				
			||||
             | 
				
			||||
 | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Remove the specified resource from storage. | 
				
			||||
     * | 
				
			||||
     * @param  int  $id | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function delete($id) | 
				
			||||
    { | 
				
			||||
        $setting=VisaService::findorfail($id); | 
				
			||||
        if (is_file(public_path().'/'.$setting->icon) && file_exists(public_path().'/'.$setting->icon)){ | 
				
			||||
            unlink(public_path().'/'.$setting->icon); | 
				
			||||
        } | 
				
			||||
        $setting->delete(); | 
				
			||||
        Session::flash('success','Service has been sucessfully deleted!'); | 
				
			||||
        return redirect($this->redirect); | 
				
			||||
        //dd("here"); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
 | 
				
			||||
    public function service_point($service_point_id){ | 
				
			||||
        if(Auth::user()){ | 
				
			||||
            $setting = VisaServicePoint::findorfail($service_point_id); | 
				
			||||
            $setting->delete(); | 
				
			||||
            return response()->json(['service_point_id' => $service_point_id]); | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,281 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers\Admin; | 
				
			||||
 | 
				
			||||
use App\Http\Controllers\Controller; | 
				
			||||
use App\Models\VisaService; | 
				
			||||
use App\Models\VisaServiceSection; | 
				
			||||
use App\Models\VisaServiceSectionPoint; | 
				
			||||
use App\Models\Setting; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
use App\Models\User; | 
				
			||||
use Illuminate\Support\Facades\Auth; | 
				
			||||
use Illuminate\Support\Facades\Session; | 
				
			||||
 | 
				
			||||
class VisaServiceSectionController extends Controller | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Display a listing of the resource. | 
				
			||||
     * | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
 | 
				
			||||
    protected $view = 'admin.visa_service_section.'; | 
				
			||||
    protected $redirect = 'admin/visa_services/{id}/sections'; | 
				
			||||
 | 
				
			||||
    public function index($id) | 
				
			||||
    { | 
				
			||||
        $service_name = VisaService::findorfail($id)->name; | 
				
			||||
        $service_section = VisaServiceSection::where('visa_service_id',$id); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        // if(\request('name')){ | 
				
			||||
        //     $key = \request('name'); | 
				
			||||
        //     $services = $services->where('name','like','%'.$key.'%'); | 
				
			||||
        // } | 
				
			||||
        // if(\request('status')){ | 
				
			||||
        //     $key = \request('status'); | 
				
			||||
        //     $services = $services->where('status',$key); | 
				
			||||
        // } | 
				
			||||
        $service_sections = $service_section->paginate(config('custom.per_page')); | 
				
			||||
        return view($this->view.'index',compact('service_sections','service_name','id')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Show the form for creating a new resource. | 
				
			||||
     * | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function create($id) | 
				
			||||
    { | 
				
			||||
        $service_name = VisaService::findorfail($id)->name; | 
				
			||||
        return view($this->view.'create',compact('service_name','id')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Store a newly created resource in storage. | 
				
			||||
     * | 
				
			||||
     * @param  \Illuminate\Http\Request  $request | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function store(Request $request,$id) | 
				
			||||
    { | 
				
			||||
         | 
				
			||||
        | 
				
			||||
        $this->validate(\request(),[ | 
				
			||||
             | 
				
			||||
            // 'title' => 'required', | 
				
			||||
            'status' => 'required', | 
				
			||||
            'order_by' => 'required' | 
				
			||||
            | 
				
			||||
        ]); | 
				
			||||
        $service_section = new VisaServiceSection(); | 
				
			||||
 | 
				
			||||
        $service_section->right_title = \request('right_title'); | 
				
			||||
        $service_section->right_sub_title = \request('right_sub_title'); | 
				
			||||
        $service_section->left_title = \request('left_title'); | 
				
			||||
        $service_section->left_sub_title = \request('left_sub_title'); | 
				
			||||
        $service_section->top_description = strip_tags(\request('top_description')); | 
				
			||||
        $service_section->left_description = strip_tags(\request('left_description')); | 
				
			||||
        $service_section->point_title = strip_tags(\request('point_title')); | 
				
			||||
        $service_section->visa_length = strip_tags(\request('visa_length')); | 
				
			||||
         | 
				
			||||
        $service_section->visa_service_id = $id; | 
				
			||||
        $service_section->status = \request('status'); | 
				
			||||
        $service_section->order_by = \request('order_by'); | 
				
			||||
        // $service->image_alt = \request('image_alt'); | 
				
			||||
        // $service->slug = Setting::create_slug(\request('seo_title')); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        if($request->hasFile('image')){ | 
				
			||||
            $extension = \request()->file('image')->getClientOriginalExtension(); | 
				
			||||
            $image_folder_type = array_search('visa_service',config('custom.image_folders')); //for image saved in folder | 
				
			||||
            // dd($image_folder_type); | 
				
			||||
            $count = rand(100,999); | 
				
			||||
            $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); | 
				
			||||
                $image_path = $out_put_path[0]; | 
				
			||||
                $service_section->image = $image_path; | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        if($service_section->save()){ | 
				
			||||
            $points = $request->points; | 
				
			||||
            // $point_descriptions = $request->point_descriptions ?? []; | 
				
			||||
            // $icons = $request->icons ?? []; | 
				
			||||
             | 
				
			||||
            if($points[0] != null){ | 
				
			||||
                | 
				
			||||
            foreach($points as $key => $point){ | 
				
			||||
 | 
				
			||||
                $service_section_point = new VisaServiceSectionPoint(); | 
				
			||||
                 | 
				
			||||
                $service_section_point->visa_service_section_id = $service_section->id; | 
				
			||||
                 | 
				
			||||
                $service_section_point->point = $point; | 
				
			||||
                $service_section_point->save(); | 
				
			||||
            } | 
				
			||||
            } | 
				
			||||
            Session::flash('success','Visa Service Section has been created!'); | 
				
			||||
            return redirect('admin/visa_services/'.$id.'/sections'); | 
				
			||||
 | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Display the specified resource. | 
				
			||||
     * | 
				
			||||
     * @param  int  $id | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function show($id,$secId) | 
				
			||||
    { | 
				
			||||
         | 
				
			||||
         | 
				
			||||
        // $service = new Service(); | 
				
			||||
        // $service_section = new ServiceSection(); | 
				
			||||
        $service = VisaService::findorfail($id); | 
				
			||||
 | 
				
			||||
        $service_section = VisaServiceSection::findorfail($secId); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        return view($this->view . 'show', compact('service','service_section')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Show the form for editing the specified resource. | 
				
			||||
     * | 
				
			||||
     * @param  int  $id | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function edit($id,$secId) | 
				
			||||
    { | 
				
			||||
        $service = new VisaService(); | 
				
			||||
        $service_section = new VisaServiceSection(); | 
				
			||||
        $service = $service->findorfail($id); | 
				
			||||
        $service_section = $service_section->findorfail($secId); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        return view($this->view . 'edit', compact('service','service_section')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Update the specified resource in storage. | 
				
			||||
     * | 
				
			||||
     * @param  \Illuminate\Http\Request  $request | 
				
			||||
     * @param  int  $id | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function update(Request $request, $id, $secId) | 
				
			||||
    { | 
				
			||||
        $this->validate(\request(),[ | 
				
			||||
            'top_description' => 'required', | 
				
			||||
            'status' => 'required', | 
				
			||||
            'order_by' => 'required' | 
				
			||||
        ]); | 
				
			||||
        $service_section = VisaServiceSection::findOrFail($secId); | 
				
			||||
        $service_section->right_title = \request('right_title'); | 
				
			||||
        $service_section->right_sub_title = \request('right_sub_title'); | 
				
			||||
        $service_section->left_title = \request('left_title'); | 
				
			||||
        $service_section->left_sub_title = \request('left_sub_title'); | 
				
			||||
        $service_section->top_description = strip_tags(\request('top_description')); | 
				
			||||
        $service_section->left_description = strip_tags(\request('left_description')); | 
				
			||||
        $service_section->point_title = strip_tags(\request('point_title')); | 
				
			||||
        $service_section->visa_length = strip_tags(\request('visa_length')); | 
				
			||||
         | 
				
			||||
        $service_section->visa_service_id = $id; | 
				
			||||
        $service_section->status = \request('status'); | 
				
			||||
        $service_section->order_by = \request('order_by'); | 
				
			||||
 | 
				
			||||
        // if($request->hasFile('image')){ | 
				
			||||
        //     $extension = \request()->file('image')->getClientOriginalExtension(); | 
				
			||||
        //     $image_folder_type = array_search('service',config('custom.image_folders')); //for image saved in folder | 
				
			||||
        //     $count = rand(100,999); | 
				
			||||
        //     $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); | 
				
			||||
        //     $image_path = $out_put_path[0]; | 
				
			||||
        //     if (is_file(public_path().'/'.$service_section->image) && file_exists(public_path().'/'.$service_section->image)){ | 
				
			||||
        //         unlink(public_path().'/'.$service_section->image); | 
				
			||||
        //     } | 
				
			||||
        //     $service_section->image = $image_path; | 
				
			||||
        // } | 
				
			||||
        if($service_section->update()){ | 
				
			||||
            $points = $request->points; | 
				
			||||
            if($points[0] != null){ | 
				
			||||
 | 
				
			||||
                if($request['point_ids'] !== null){ | 
				
			||||
 | 
				
			||||
                    foreach($request['point_ids'] as $key => $pid){ | 
				
			||||
                        $service_section_point = new VisaServiceSectionPoint(); | 
				
			||||
                        $service_section_point = $service_section_point->find($pid); | 
				
			||||
                        // $service_section_point =  ServiceSectionPoint::find($id); | 
				
			||||
 | 
				
			||||
                        $service_section_point->point = $points[$key]; | 
				
			||||
                        $service_section_point->update(); | 
				
			||||
                    } | 
				
			||||
                }else{ | 
				
			||||
                    foreach($points as $key => $point){ | 
				
			||||
 | 
				
			||||
                        $service_section_point = new VisaServiceSectionPoint(); | 
				
			||||
                         | 
				
			||||
                        $service_section_point->visa_service_section_id = $service_section->id; | 
				
			||||
                         | 
				
			||||
                        $service_section_point->point = $point; | 
				
			||||
                        $service_section_point->save(); | 
				
			||||
                    } | 
				
			||||
                } | 
				
			||||
 | 
				
			||||
            } | 
				
			||||
                // $service_point = $service_section->service_section_point(); | 
				
			||||
                // $service_point->delete(); | 
				
			||||
            // foreach($points as $key => $point){ | 
				
			||||
 | 
				
			||||
            //     $service_section_point = new ServiceSectionPoint(); | 
				
			||||
            //     $service_section_point->service_section_id = $service_section->id; | 
				
			||||
            //     if(array_key_exists($key,$point_descriptions)){ | 
				
			||||
            //     $service_section_point->point_description = $point_descriptions[$key]; | 
				
			||||
            //     } | 
				
			||||
            //     if(array_key_exists($key,$icons)){ | 
				
			||||
            //     $extension = $icons[$key]->getClientOriginalExtension(); | 
				
			||||
            //     $image_folder_type = array_search('service',config('custom.image_folders')); //for image saved in folder | 
				
			||||
             | 
				
			||||
            //     $count = rand(100,999); | 
				
			||||
             | 
				
			||||
            //     $out_put_path = User::save_image($icons[$key],$extension,$count,$image_folder_type); | 
				
			||||
            //     is_array($out_put_path) ? $service_section_point->icon = $out_put_path[0] : $service_section_point->icon = $out_put_path; | 
				
			||||
            //     // $service_section_point->icon = $points_descriptions[$key]; | 
				
			||||
            //    } | 
				
			||||
            //     $service_section_point->point = $point; | 
				
			||||
            //     $service_section_point->update(); | 
				
			||||
            // } | 
				
			||||
         | 
				
			||||
            Session::flash('success','Visa Service Section has been successfully updated!'); | 
				
			||||
            return redirect('admin/visa_services/'.$id.'/sections'); | 
				
			||||
 | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Remove the specified resource from storage. | 
				
			||||
     * | 
				
			||||
     * @param  int  $id | 
				
			||||
     * @return \Illuminate\Http\Response | 
				
			||||
     */ | 
				
			||||
    public function destroy($id) | 
				
			||||
    { | 
				
			||||
        // | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function service_point($service_point_id){ | 
				
			||||
        if(Auth::user()){ | 
				
			||||
            $setting = ServiceSectionPoint::findorfail($service_point_id); | 
				
			||||
            $setting->delete(); | 
				
			||||
            return response()->json(['service_point_id' => $service_point_id]); | 
				
			||||
        } | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,334 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers; | 
				
			||||
 | 
				
			||||
use App\Http\Requests\ContactRequest; | 
				
			||||
use App\Models\NewsAndUpdate; | 
				
			||||
use App\Models\Service; | 
				
			||||
use App\Models\AboutUs; | 
				
			||||
use App\Models\Accomodation; | 
				
			||||
use App\Models\Gallery; | 
				
			||||
use App\Models\Slider; | 
				
			||||
use App\Models\Contact; | 
				
			||||
use App\Models\Setting; | 
				
			||||
use App\Models\Applicant; | 
				
			||||
use App\Models\Subscription; | 
				
			||||
use App\Models\ApplicantService; | 
				
			||||
use App\Models\Testimonial; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
use Illuminate\Support\Facades\Auth; | 
				
			||||
use Mail; | 
				
			||||
use App\Models\User; | 
				
			||||
use App\Models\Partner; | 
				
			||||
use PDF; | 
				
			||||
use Illuminate\Support\Str; | 
				
			||||
use Illuminate\Support\Facades\Artisan; | 
				
			||||
 | 
				
			||||
class HomeController extends Controller | 
				
			||||
{ | 
				
			||||
     | 
				
			||||
    public function runQueueJobs(){ | 
				
			||||
        Artisan::call('queue:listen'); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function index() | 
				
			||||
    { | 
				
			||||
        | 
				
			||||
        $about_us = AboutUs::where('status',1)->get(); | 
				
			||||
        $testimonials = Testimonial::where('status',1)->get(); | 
				
			||||
        $news_and_updates= NewsAndUpdate::where(['status'=>'1'])->orderBy('id','desc')->get(); | 
				
			||||
        $sliders = Slider::where('status',1)->get(); | 
				
			||||
        $services = Service::where('status',1)->orderByRaw('CONVERT(order_by, SIGNED) asc')->limit(9)->get(); | 
				
			||||
        $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(); | 
				
			||||
        $employers = Setting::where(['key' => 'employers','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','video','employers')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function service(){ | 
				
			||||
        $services = Service::where('status',1)->orderByRaw('CONVERT(order_by, SIGNED) asc')->get(); | 
				
			||||
        $service_limit = Service::where('status',1)->limit('8')->get(); | 
				
			||||
        return view('service', compact('services','service_limit')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function about(){ | 
				
			||||
        $about = AboutUs::where('status',1)->get(); | 
				
			||||
        return view('about',compact('about')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function ndis(){ | 
				
			||||
        return view('ndis-scheme'); | 
				
			||||
    } | 
				
			||||
    public function contact(){ | 
				
			||||
        $services = Service::where('status',1)->get(); | 
				
			||||
        $phone = Setting::where(['key' => 'phone','status' => '1'])->first(); | 
				
			||||
        $email = Setting::where(['key' => 'email','status' => '1'])->first(); | 
				
			||||
        $address = Setting::where(['key' => 'address','status' => '1'])->first(); | 
				
			||||
        return view('contact',compact('phone','email','address','services')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function accommodation_details($id){ | 
				
			||||
        $accomodation = Accomodation::find($id); | 
				
			||||
        return view('accommodation',compact('accomodation')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function send_contact_mail(ContactRequest $request){ | 
				
			||||
        $this->validate(\request(),[ | 
				
			||||
             | 
				
			||||
        ]); | 
				
			||||
       $contact = new Contact(); | 
				
			||||
       $subject = htmlentities('Quick Enquiry'); | 
				
			||||
       $check = ''; | 
				
			||||
       if(isset($request['check'])){ | 
				
			||||
        $subject = htmlentities('Contact Enquiry'); | 
				
			||||
        $check = '1'; | 
				
			||||
       } | 
				
			||||
       $name = ($request['firstname'] != null) ? ($request['firstname'].' '.$request['lastname']) : $request['fullname'] ; | 
				
			||||
 | 
				
			||||
       $contact->fullname = $name; | 
				
			||||
       $contact->email = $request['email']; | 
				
			||||
       $contact->phone = $request['phone']; | 
				
			||||
       $contact->message = $request['message']; | 
				
			||||
 | 
				
			||||
       $service = ''; | 
				
			||||
        if($request->service_id != null){ | 
				
			||||
          $service = Service::find($request['service_id'])->name ; | 
				
			||||
          $contact->service_id = $request['service_id']; | 
				
			||||
        } | 
				
			||||
        $contact->save(); | 
				
			||||
 | 
				
			||||
        dispatch(function() use ($check,$subject, $contact,$service) { | 
				
			||||
        \Mail::send('contact_mail', array( | 
				
			||||
 | 
				
			||||
            'full_name' =>$contact['fullname'], | 
				
			||||
 | 
				
			||||
            'email' =>$contact['email'], | 
				
			||||
 | 
				
			||||
            'phone' =>$contact['phone'], | 
				
			||||
 | 
				
			||||
            'contact_message' =>$contact['message'], | 
				
			||||
 | 
				
			||||
            'subject' =>$subject , | 
				
			||||
 | 
				
			||||
            'check' => $check ?? '', | 
				
			||||
 | 
				
			||||
            'service' => $service ?? '' | 
				
			||||
 | 
				
			||||
           ), function($message) use ($subject){ | 
				
			||||
            // $subject=($service!= '') ? 'Enquiry for '.$service : 'Contact/Feedback'; | 
				
			||||
            $message->subject($subject); | 
				
			||||
            // $message->to('info@agilityhomecare.com.au', 'AgilityHomeCare')->subject($subject); | 
				
			||||
            $message->to('mahesh@extratechs.com.au', 'Extratech')->subject($subject); | 
				
			||||
            $message->to('suman@extratechs.com.au', 'Extratech')->subject($subject); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
           }); | 
				
			||||
        }); | 
				
			||||
        // return redirect()->back()->with(['msg' => 'Successfully submitted.']); | 
				
			||||
        return redirect()->back()->with(['msg' => 'Thank you for your interest. We will get back to you soon.']); | 
				
			||||
        // return response()->json(['success' => 'Thank you for your interest. We will get back to you soon.','status' =>'Ok'],200); | 
				
			||||
 | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function save_career(Request $request){ | 
				
			||||
       | 
				
			||||
        $applicant = new Applicant(); | 
				
			||||
        $subject = 'Career Enquiry'; | 
				
			||||
       | 
				
			||||
        // $name = ($request['firstname'] != null) ? ($request['firstname'].' '.$request['lastname']) : $request['fullname'] ; | 
				
			||||
        $name = $request['name']; | 
				
			||||
        $applicant->name = $name; | 
				
			||||
        $applicant->email = $request['email']; | 
				
			||||
        $applicant->phone = $request['phone']; | 
				
			||||
        $applicant->message = $request['message']; | 
				
			||||
        $applicant->state = $request['state']; | 
				
			||||
        $applicant->is_in_mailing_list = $request['is_in_mailing_list']; | 
				
			||||
 | 
				
			||||
        if($request->hasFile('file')){ | 
				
			||||
            $extension = \request()->file('file')->getClientOriginalExtension(); | 
				
			||||
            $image_folder_type = array_search('applicant',config('custom.image_folders')); //for image saved in folder | 
				
			||||
            $count = rand(100,999); | 
				
			||||
            $out_put_path = User::save_image(\request('file'),$extension,$count,$image_folder_type); | 
				
			||||
          | 
				
			||||
            is_array($out_put_path) ? $applicant->resume = $out_put_path[0] : $applicant->resume = $out_put_path; | 
				
			||||
        } | 
				
			||||
         | 
				
			||||
        if($applicant->save()){ | 
				
			||||
            $services = $request['career_areas']; | 
				
			||||
            if(!is_null($services)){ | 
				
			||||
                foreach($services as $service){ | 
				
			||||
                    $applicant_service = new ApplicantService(); | 
				
			||||
                    $applicant_service->applicant_id = $applicant->id; | 
				
			||||
                    $applicant_service->service_id = $service; | 
				
			||||
                    $applicant_service->save(); | 
				
			||||
                } | 
				
			||||
            } | 
				
			||||
        } | 
				
			||||
  | 
				
			||||
       dispatch(function() use ($subject, $applicant ,$services) { | 
				
			||||
         \Mail::send('career_mail', array( | 
				
			||||
              | 
				
			||||
            'name' => $applicant->first()->name, | 
				
			||||
              | 
				
			||||
            'email' => $applicant->first()->email, | 
				
			||||
 | 
				
			||||
            'phone' => $applicant->first()->phone, | 
				
			||||
 | 
				
			||||
            'message_details' => $applicant->first()->message, | 
				
			||||
 | 
				
			||||
            'state' => $applicant->first()->state, | 
				
			||||
 | 
				
			||||
            'subject' =>$subject , | 
				
			||||
 | 
				
			||||
            'services' =>$services , | 
				
			||||
  | 
				
			||||
            ), function($message) use ($subject,$applicant){ | 
				
			||||
             // $subject=($service!= '') ? 'Enquiry for '.$service : 'Contact/Feedback'; | 
				
			||||
             $message->subject($subject); | 
				
			||||
             if($applicant->resume != ''){ | 
				
			||||
                $resume = url($applicant->resume); | 
				
			||||
                $message->attach($resume); | 
				
			||||
              } | 
				
			||||
             // $message->to('info@agilityhomecare.com.au', 'AgilityHomeCare')->subject($subject); | 
				
			||||
             $message->to('mahesh@extratechs.com.au', 'Extratech')->subject($subject); | 
				
			||||
            //  $message->cc('extratechweb@gmail.com', 'Extratech')->subject($subject); | 
				
			||||
  | 
				
			||||
  | 
				
			||||
            }); | 
				
			||||
         }); | 
				
			||||
  | 
				
			||||
         return redirect()->back()->with(['msg' => 'Successfully submitted.']); | 
				
			||||
  | 
				
			||||
     } | 
				
			||||
 | 
				
			||||
    public function testimonials(){ | 
				
			||||
        $testimonials = Testimonial::where('status',1)->get(); | 
				
			||||
        return view('testimonial',compact('testimonials')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function blogs(){ | 
				
			||||
        $blogs = NewsAndUpdate::where('status',1)->get(); | 
				
			||||
        return view('blogs',compact('blogs')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function single(){ | 
				
			||||
        return view('service.single'); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function career(){ | 
				
			||||
        $career = Career::where(['status'=>1])->get(); | 
				
			||||
        return view('career',compact('career')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function enquiry(){ | 
				
			||||
        $services = Service::where('status',1)->orderByRaw('CONVERT(order_by, SIGNED) asc')->get(); | 
				
			||||
        return view('enquiry',compact('services')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
     public function coordination(){ | 
				
			||||
         return view('coordination-form'); | 
				
			||||
     } | 
				
			||||
 | 
				
			||||
    public  function gallery(){ | 
				
			||||
        $gallery = Gallery::where(['status'=>1])->get(); | 
				
			||||
        return view('gallery',compact('gallery')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function working_dice(){ | 
				
			||||
        $services = Service::where('status',1)->get(); | 
				
			||||
        return view('working-dice',compact('services')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function getLogin() | 
				
			||||
    { | 
				
			||||
        if(Auth::check()){ | 
				
			||||
            return redirect('admin'); | 
				
			||||
        } | 
				
			||||
        return view('admin.login'); | 
				
			||||
    } | 
				
			||||
    public function postLogin() | 
				
			||||
    { | 
				
			||||
        $this->validate(request(),[ | 
				
			||||
            'email'=>'required', | 
				
			||||
            'password'=>'required', | 
				
			||||
        ]); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
        if (Auth::attempt(['email'=>request('email'),'password'=>request('password')],request()->has('remember'))){ | 
				
			||||
            return redirect('admin'); | 
				
			||||
        } | 
				
			||||
//        Session::flash('success','Invalid Credential!'); | 
				
			||||
        return redirect('login')->withErrors(['Invalid Credentials!']); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function admin() | 
				
			||||
    { | 
				
			||||
        if(Auth::check()){ | 
				
			||||
                return view('admin.index'); | 
				
			||||
        } | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function getLogout() | 
				
			||||
    { | 
				
			||||
        Auth::logout(); | 
				
			||||
        return redirect('login'); | 
				
			||||
    } | 
				
			||||
    public function subscribe(Request $request) | 
				
			||||
    { | 
				
			||||
 | 
				
			||||
        $email = $request->email; | 
				
			||||
        $name = $request->name; | 
				
			||||
        $subscription = new Subscription(); | 
				
			||||
        $subscription->email = $email; | 
				
			||||
        $subscription->name = $name; | 
				
			||||
        $subscription->save(); | 
				
			||||
 | 
				
			||||
        dispatch(function() use ($subscription) { | 
				
			||||
        \Mail::send('subscribe_mail', array( | 
				
			||||
 | 
				
			||||
            'email' =>$subscription['email'], | 
				
			||||
 | 
				
			||||
            'name' =>$subscription['name'], | 
				
			||||
 | 
				
			||||
            'subject' => 'Subscription Notice', | 
				
			||||
 | 
				
			||||
           ), function($message) use ($subscription){ | 
				
			||||
                | 
				
			||||
            $subject = 'Subscription Notice'; | 
				
			||||
            $message->subject('Subscription Notice'); | 
				
			||||
            // $message->to('info@agilityhomecare.com.au', 'Qualuty Allied Health')->subject($subject); | 
				
			||||
            $message->to('mahesh@extratechs.com.au', 'Extratech')->subject($subject); | 
				
			||||
            // $message->cc('info@extratechs.com.au', 'Extratech')->subject('Subscription Notice'); | 
				
			||||
 | 
				
			||||
           }); | 
				
			||||
        }); | 
				
			||||
           return response()->json(['success' => 'Successfully subscribed!','status' =>'Ok'],200); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function single_blog($slug){ | 
				
			||||
        $blog = NewsAndUpdate::where(['slug' => $slug,'status' => 1])->orderby('id','asc')->first(); | 
				
			||||
        // $services = Service::where('status',1)->get(); | 
				
			||||
        return view('blog.single',compact('blog')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function refreshCaptcha() | 
				
			||||
    { | 
				
			||||
        return response()->json(['captcha_code'=> Str::random(5)]); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function news(){ | 
				
			||||
        $news_and_updates = NewsAndUpdate::where('status',1)->get(); | 
				
			||||
        return view('news',compact('news_and_updates')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
     | 
				
			||||
     | 
				
			||||
} | 
				
			||||
@ -1,14 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers; | 
				
			||||
 | 
				
			||||
use App\Models\NewsAndUpdate; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
 | 
				
			||||
class NewsController extends Controller | 
				
			||||
{ | 
				
			||||
    public function news_detail($slug){ | 
				
			||||
        $news = NewsAndUpdate::where('slug',$slug)->get(); | 
				
			||||
        return view('news_detail',compact('news')); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,104 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers; | 
				
			||||
 | 
				
			||||
use App\Models\Recruitment; | 
				
			||||
use App\Models\Applicant; | 
				
			||||
use App\Models\User; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
use App\Http\Requests\Recruitment\ApplyRequest; | 
				
			||||
use App\Http\Requests\Recruitment\VacancyRequest; | 
				
			||||
 | 
				
			||||
class RecruitmentController extends Controller | 
				
			||||
{ | 
				
			||||
    public function save_vacancy(VacancyRequest $request){ | 
				
			||||
         | 
				
			||||
        $recruitment = new Recruitment(); | 
				
			||||
       $subject = htmlentities('Recruitment Enquiry'); | 
				
			||||
 | 
				
			||||
       $recruitment->full_name = $request['full_name']; | 
				
			||||
       $recruitment->company = $request['company']; | 
				
			||||
       $recruitment->email = $request['email']; | 
				
			||||
       $recruitment->no_of_position = $request['no_of_position']; | 
				
			||||
       $recruitment->enquiry = $request['enquiry']; | 
				
			||||
      | 
				
			||||
       $recruitment->save(); | 
				
			||||
 | 
				
			||||
        dispatch(function() use ($subject, $recruitment) { | 
				
			||||
        \Mail::send('recruitment_mail', array( | 
				
			||||
 | 
				
			||||
            'full_name' =>$recruitment['full_name'], | 
				
			||||
 | 
				
			||||
            'email' =>$recruitment['email'], | 
				
			||||
 | 
				
			||||
            'company' =>$recruitment['company'], | 
				
			||||
 | 
				
			||||
            'enquiry' =>$recruitment['enquiry'], | 
				
			||||
 | 
				
			||||
            'no_of_position' =>$recruitment['no_of_position'], | 
				
			||||
 | 
				
			||||
            'subject' =>$subject , | 
				
			||||
 | 
				
			||||
           ), function($message) use ($subject){  | 
				
			||||
            // $subject=($service!= '') ? 'Enquiry for '.$service : 'Contact/Feedback'; | 
				
			||||
            $message->subject($subject); | 
				
			||||
            // $message->to('info@agilityhomecare.com.au', 'AgilityHomeCare')->subject($subject); | 
				
			||||
            $message->to('mahesh@extratechs.com.au', 'Extratech')->subject($subject); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
           }); | 
				
			||||
        }); | 
				
			||||
        return redirect()->back()->with(['msg' => 'Thank you! Your recruitment details have been recieved.']); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function apply(ApplyRequest $request){ | 
				
			||||
 | 
				
			||||
        $recruitment = new Applicant(); | 
				
			||||
       $subject = 'Applicant Enquiry'; | 
				
			||||
 | 
				
			||||
       $recruitment->full_name = $request['full_name']; | 
				
			||||
       $recruitment->country = $request['country']; | 
				
			||||
       $recruitment->phone = $request['phone']; | 
				
			||||
       $recruitment->email = $request['email']; | 
				
			||||
       $recruitment->has_visa_permit = $request['has_visa_permit']; | 
				
			||||
       $recruitment->has_skill_assessed = $request['has_skill_assessed']; | 
				
			||||
       if($request->hasFile('file')){ | 
				
			||||
        $extension = \request()->file('file')->getClientOriginalExtension(); | 
				
			||||
        $image_folder_type = array_search('applicant',config('custom.image_folders')); //for image saved in folder | 
				
			||||
        $count = rand(100,999); | 
				
			||||
        $out_put_path = User::save_image(\request('file'),$extension,$count,$image_folder_type); | 
				
			||||
      | 
				
			||||
        is_array($out_put_path) ? $recruitment->resume = $out_put_path[0] : $recruitment->resume = $out_put_path; | 
				
			||||
    } | 
				
			||||
     | 
				
			||||
       $recruitment->save(); | 
				
			||||
 | 
				
			||||
        dispatch(function() use ($subject, $recruitment) { | 
				
			||||
        \Mail::send('applicant_mail', array( | 
				
			||||
 | 
				
			||||
            'full_name' => $recruitment->full_name, | 
				
			||||
              | 
				
			||||
            'email' => $recruitment->email, | 
				
			||||
 | 
				
			||||
            'phone' => $recruitment->phone, | 
				
			||||
 | 
				
			||||
            'country' => $recruitment->country, | 
				
			||||
 | 
				
			||||
            'work_permit' => $recruitment->has_visa_permit, | 
				
			||||
 | 
				
			||||
            'subject' =>$subject , | 
				
			||||
 | 
				
			||||
            'tra_skill' =>$recruitment->has_skill_assessed , | 
				
			||||
 | 
				
			||||
           ), function($message) use ($subject){  | 
				
			||||
            // $subject=($service!= '') ? 'Enquiry for '.$service : 'Contact/Feedback'; | 
				
			||||
            $message->subject($subject); | 
				
			||||
            // $message->to('info@agilityhomecare.com.au', 'AgilityHomeCare')->subject($subject); | 
				
			||||
            $message->to('mahesh@extratechs.com.au', 'Extratech')->subject($subject); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
           }); | 
				
			||||
        }); | 
				
			||||
        return redirect()->back()->with(['msg' => 'Thank you! Your details have been recieved.']); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,33 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Controllers; | 
				
			||||
 | 
				
			||||
use App\Models\Service; | 
				
			||||
use App\Models\Accomodation; | 
				
			||||
use App\Models\VisaService; | 
				
			||||
use Illuminate\Http\Request; | 
				
			||||
 | 
				
			||||
class ServiceController extends Controller | 
				
			||||
{ | 
				
			||||
    public function single_service($slug){ | 
				
			||||
        $service = Service::where(['slug' => $slug,'status' => 1])->orderby('order_by','asc')->first(); | 
				
			||||
        $services = Service::where('status',1)->get(); | 
				
			||||
        // $accomodations = Accomodation::where('status',1)->get(); | 
				
			||||
         | 
				
			||||
        return view('service_view',compact('service','services')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function list(){ | 
				
			||||
        $services = Service::where('status',1)->get(); | 
				
			||||
        $visa_services = VisaService::where('status',1)->get(); | 
				
			||||
        return view('services',compact('services','visa_services')); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function single_visa_service($slug){ | 
				
			||||
        $service = VisaService::where(['slug' => $slug,'status' => 1])->orderby('order_by','asc')->first(); | 
				
			||||
        $services = VisaService::where('status',1)->get(); | 
				
			||||
        // $accomodations = Accomodation::where('status',1)->get(); | 
				
			||||
         | 
				
			||||
        return view('service_detail',compact('service','services')); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,47 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Requests; | 
				
			||||
 | 
				
			||||
use Illuminate\Foundation\Http\FormRequest; | 
				
			||||
 | 
				
			||||
class ContactRequest extends FormRequest | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Determine if the user is authorized to make this request. | 
				
			||||
     * | 
				
			||||
     * @return bool | 
				
			||||
     */ | 
				
			||||
    public function authorize() | 
				
			||||
    { | 
				
			||||
        return true; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Get the validation rules that apply to the request. | 
				
			||||
     * | 
				
			||||
     * @return array<string, mixed> | 
				
			||||
     */ | 
				
			||||
    public function rules() | 
				
			||||
    { | 
				
			||||
        return [ | 
				
			||||
            'fullname' => ['required'], | 
				
			||||
            'phone' => ['required'], | 
				
			||||
            'email' => ['required'], | 
				
			||||
            'service_id' => ['required'], | 
				
			||||
            'entered_captcha_code' => ['required','same:displayed_captcha_code'] | 
				
			||||
        ]; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function messages(){ | 
				
			||||
        return[ | 
				
			||||
 | 
				
			||||
            'fullname.required' => 'Full name is required.', | 
				
			||||
            'phone.required' => 'Phone number is required.', | 
				
			||||
            'email.required' => 'Email is required.', | 
				
			||||
            'service_id.required' => 'Please select a service.', | 
				
			||||
            'entered_captcha_code.required' => 'Please enter captcha.', | 
				
			||||
            'entered_captcha_code.same' => 'Captcha is incorrect.' | 
				
			||||
 | 
				
			||||
        ]; | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,51 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Requests\Recruitment; | 
				
			||||
 | 
				
			||||
use Illuminate\Foundation\Http\FormRequest; | 
				
			||||
 | 
				
			||||
class ApplyRequest extends FormRequest | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Determine if the user is authorized to make this request. | 
				
			||||
     * | 
				
			||||
     * @return bool | 
				
			||||
     */ | 
				
			||||
    public function authorize() | 
				
			||||
    { | 
				
			||||
        return true; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Get the validation rules that apply to the request. | 
				
			||||
     * | 
				
			||||
     * @return array<string, mixed> | 
				
			||||
     */ | 
				
			||||
    public function rules() | 
				
			||||
    { | 
				
			||||
        return [ | 
				
			||||
            'full_name' => 'required', | 
				
			||||
            'phone' => 'required', | 
				
			||||
            'email' => 'required', | 
				
			||||
            'file' => 'required', | 
				
			||||
            'country' => 'required', | 
				
			||||
            'has_visa_permit' => 'required', | 
				
			||||
            'has_skill_assessed' => 'required', | 
				
			||||
            'entered_captcha_code' => ['required','same:displayed_captcha_code'] | 
				
			||||
        ]; | 
				
			||||
    } | 
				
			||||
    public function messages() | 
				
			||||
    { | 
				
			||||
        return [ | 
				
			||||
            'full_name.required' => 'Full name is required.', | 
				
			||||
            'phone.required' => 'Phone number is required.', | 
				
			||||
            'email.required' => 'Email is required.', | 
				
			||||
            'file.required' => 'Please upload your resume.', | 
				
			||||
            'country.required' => 'Please select your country.', | 
				
			||||
            'has_visa_permit.required' => 'Please specify your visa permit position.', | 
				
			||||
            'has_skill_assesed.required' => 'Please specify your TRA skill assessment.', | 
				
			||||
            'entered_captcha_code.required' => 'Please enter captcha.', | 
				
			||||
            'entered_captcha_code.same' => 'Captcha is incorrect.' | 
				
			||||
        ]; | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,45 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Http\Requests\Recruitment; | 
				
			||||
 | 
				
			||||
use Illuminate\Foundation\Http\FormRequest; | 
				
			||||
 | 
				
			||||
class VacancyRequest extends FormRequest | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Determine if the user is authorized to make this request. | 
				
			||||
     * | 
				
			||||
     * @return bool | 
				
			||||
     */ | 
				
			||||
    public function authorize() | 
				
			||||
    { | 
				
			||||
        return true; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Get the validation rules that apply to the request. | 
				
			||||
     * | 
				
			||||
     * @return array<string, mixed> | 
				
			||||
     */ | 
				
			||||
    public function rules() | 
				
			||||
    { | 
				
			||||
        return [ | 
				
			||||
            'full_name' => 'required', | 
				
			||||
            'company' => 'required', | 
				
			||||
            'email' => 'required', | 
				
			||||
            'no_of_position' => 'required', | 
				
			||||
            'entered_captcha_code' => ['required','same:displayed_captcha_code'] | 
				
			||||
        ]; | 
				
			||||
    } | 
				
			||||
    public function messages() | 
				
			||||
    { | 
				
			||||
        return [ | 
				
			||||
            'full_name.required' => 'Full name is required.', | 
				
			||||
            'company.required' => 'Your company is required.', | 
				
			||||
            'email.required' => 'Email is required.', | 
				
			||||
            'no_of_position.required' => 'Number of position is required', | 
				
			||||
            'entered_captcha_code.required' => 'Please enter captcha.', | 
				
			||||
            'entered_captcha_code.same' => 'Captcha is incorrect.' | 
				
			||||
        ]; | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,16 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class AboutUs extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
    protected $table = "about_us"; | 
				
			||||
 | 
				
			||||
    public function about_us_points(){ | 
				
			||||
        return $this->hasMany(AboutUsPoint::class); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,16 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class AboutUsPoint extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
    protected $table = "about_us_points"; | 
				
			||||
 | 
				
			||||
    public function about_us(){ | 
				
			||||
        return $this->belongsto(AboutUs::class); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,31 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class Accomodation extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
    protected $fillable=['title','slider_image','status','address','phone','email','website']; | 
				
			||||
 | 
				
			||||
    public function accommodation_features() | 
				
			||||
    { | 
				
			||||
        return $this->hasMany(AccomodationFeature::class); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function accommodation_slider_titles() | 
				
			||||
    { | 
				
			||||
        return $this->hasMany(AccomodationSliderTitle::class); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public function accommodation_informations() | 
				
			||||
    { | 
				
			||||
        return $this->hasMany(AccomodationInformation::class); | 
				
			||||
    } | 
				
			||||
    public function accommodation_images() | 
				
			||||
    { | 
				
			||||
        return $this->hasMany(AccomodationImage::class); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,11 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class AccomodationFeature extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
} | 
				
			||||
@ -1,11 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class AccomodationImage extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
} | 
				
			||||
@ -1,12 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class AccomodationInformation extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
    protected $table = 'accomodation_informations'; | 
				
			||||
} | 
				
			||||
@ -1,12 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class AccomodationSliderTitle extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
    protected $table = 'accomodation_slider_titles'; | 
				
			||||
} | 
				
			||||
@ -1,16 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class Applicant extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
 | 
				
			||||
    public function applicant_service(){ | 
				
			||||
 | 
				
			||||
        return $this->hasMany(ApplicantService::class); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,13 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class ApplicantService extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
 | 
				
			||||
    protected $table = "applicant_service"; | 
				
			||||
} | 
				
			||||
@ -1,15 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class Career extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
 | 
				
			||||
    public function career_points(){ | 
				
			||||
        return $this->hasMany(CareerPoint::class); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,11 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class CareerPoint extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
} | 
				
			||||
@ -1,17 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class Contact extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
    protected $fillable=['fullname','email','service_id','phone','message','status','created_at']; | 
				
			||||
 | 
				
			||||
    public function service(){ | 
				
			||||
        return $this->belongsto(Service::class); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
} | 
				
			||||
@ -1,13 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class Gallery extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
    protected $fillable=['slug','point_title','blog_type','image','image_alt','description','seo_title','seo_description','middle_description','bottom_description','keyword','meta_keyword','status','publish_date','title','image_credit','author','image_caption']; | 
				
			||||
 | 
				
			||||
} | 
				
			||||
@ -1,17 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class NewsAndUpdate extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
    protected $fillable=['slug','point_title','blog_type','image','image_alt','description','seo_title','seo_description','middle_description','bottom_description','keyword','meta_keyword','status','publish_date','title','image_credit','author','image_caption','thumbnail']; | 
				
			||||
 | 
				
			||||
    public function news_and_update_points() | 
				
			||||
    { | 
				
			||||
        return $this->hasMany(NewsAndUpdatePoint::class,'news_and_update_id'); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,11 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class NewsAndUpdatePoint extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
} | 
				
			||||
@ -1,13 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class Partner extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
 | 
				
			||||
    protected $guarded = ['id']; | 
				
			||||
} | 
				
			||||
@ -1,11 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class Recruitment extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
} | 
				
			||||
@ -1,16 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class Referral extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
 | 
				
			||||
    public function referral_services() | 
				
			||||
    { | 
				
			||||
        return $this->hasMany(ReferralService::class,'referral_id'); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,13 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class ReferralService extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
 | 
				
			||||
     | 
				
			||||
} | 
				
			||||
@ -1,12 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class SeoTitle extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
    protected $fillable = ['seo_title','seo_type','seo_description','keyword','meta_keyword','status']; | 
				
			||||
} | 
				
			||||
@ -1,15 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class Service extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
 | 
				
			||||
    public function service_sections(){ | 
				
			||||
        return $this->hasMany(ServiceSection::class); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,18 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class ServiceSection extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
 | 
				
			||||
    public function service(){ | 
				
			||||
        return $this->belongsTo(Service::class); | 
				
			||||
    } | 
				
			||||
    public function service_section_point(){ | 
				
			||||
        return $this->hasMany(ServiceSectionPoint::class); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,16 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class ServiceSectionPoint extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
 | 
				
			||||
    public function service_section() | 
				
			||||
    { | 
				
			||||
        return $this->belongsTo(ServiceSection::class); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,60 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class Setting extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
 | 
				
			||||
    protected $fillable =['key','value','type','slug','status']; | 
				
			||||
 | 
				
			||||
    public function setting_alt() | 
				
			||||
    { | 
				
			||||
        return $this->hasOne(SettingImageAlt::class,'setting_id'); | 
				
			||||
    } | 
				
			||||
    public static function value($kay) | 
				
			||||
    { | 
				
			||||
 | 
				
			||||
        if ($setting = Setting::select('value')->where('slug',$kay)->where('status','1')->first()){ | 
				
			||||
            return $setting->value; | 
				
			||||
        } | 
				
			||||
        else{ | 
				
			||||
            return ''; | 
				
			||||
        } | 
				
			||||
    } | 
				
			||||
    public static function key($kay) | 
				
			||||
    { | 
				
			||||
        if ($setting = Setting::select('key')->where('slug',$kay)->where('status','1')->first()){ | 
				
			||||
            return $setting->key; | 
				
			||||
        } | 
				
			||||
        else{ | 
				
			||||
            return ''; | 
				
			||||
        } | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    public static function create_slug($string) | 
				
			||||
    { | 
				
			||||
        $replace = '-'; | 
				
			||||
 | 
				
			||||
        $string = strtolower($string); | 
				
			||||
 | 
				
			||||
//        replace / and . with white space | 
				
			||||
        $string = preg_replace("/[\/\.]/"," ",$string); | 
				
			||||
        $string = preg_replace("/[^a-z0-9\s-]/","",$string); | 
				
			||||
 | 
				
			||||
//        remove multiple dashes or whitespace | 
				
			||||
        $string = preg_replace("/[\s-]+/"," ",$string); | 
				
			||||
 | 
				
			||||
//        convert whitespaces and underscore to $replace | 
				
			||||
        $string = preg_replace("/[\s_]/",$replace,$string); | 
				
			||||
 | 
				
			||||
        //        limit the string size | 
				
			||||
        $string = substr($string,0,100); | 
				
			||||
 | 
				
			||||
//      slug is generated | 
				
			||||
        return $string; | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,13 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class SettingImageAlt extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
 | 
				
			||||
 | 
				
			||||
} | 
				
			||||
@ -1,11 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class Slider extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
} | 
				
			||||
@ -1,11 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class Subscription extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
} | 
				
			||||
@ -1,11 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class SupportCoordination extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
} | 
				
			||||
@ -1,12 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class Team extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
    protected $fillable=['image','team_name','address','email','mobile_no','address','designation','status','created_at','update_at']; | 
				
			||||
} | 
				
			||||
@ -1,12 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class Testimonial extends Model | 
				
			||||
{ | 
				
			||||
    protected $fillable = ['image','heading','title','author_name','author_designation','review','status']; | 
				
			||||
    use HasFactory; | 
				
			||||
} | 
				
			||||
@ -1,15 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class VisaService extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
 | 
				
			||||
    public function visa_service_sections(){ | 
				
			||||
        return $this->hasMany(VisaServiceSection::class); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,18 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class VisaServiceSection extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
 | 
				
			||||
    public function visa_service(){ | 
				
			||||
        return $this->belongsTo(VisaService::class); | 
				
			||||
    } | 
				
			||||
    public function visa_service_section_point(){ | 
				
			||||
        return $this->hasMany(VisaServiceSectionPoint::class); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,16 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
namespace App\Models; | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Eloquent\Factories\HasFactory; | 
				
			||||
use Illuminate\Database\Eloquent\Model; | 
				
			||||
 | 
				
			||||
class VisaServiceSectionPoint extends Model | 
				
			||||
{ | 
				
			||||
    use HasFactory; | 
				
			||||
 | 
				
			||||
    public function visa_service_section() | 
				
			||||
    { | 
				
			||||
        return $this->belongsTo(VisaServiceSection::class); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,90 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
return [ | 
				
			||||
    'status' =>[ | 
				
			||||
        '1'=> 'Active', | 
				
			||||
        '2'=> 'DeActive' | 
				
			||||
    ], | 
				
			||||
    'setting_types'=>[ | 
				
			||||
        '1'=>'Sentence', | 
				
			||||
        '2'=>'Paragraph', | 
				
			||||
        '3'=>'Image' | 
				
			||||
    ], | 
				
			||||
    'blog_types'=>[ | 
				
			||||
 | 
				
			||||
        '1'=>'Featured', | 
				
			||||
        '2'=>'Not Featured', | 
				
			||||
         | 
				
			||||
    ], | 
				
			||||
    'states' =>[ | 
				
			||||
        '1'=> 'Queensland', | 
				
			||||
        '2'=> 'South Australia', | 
				
			||||
        '3' => 'Tasmania', | 
				
			||||
        '4' => 'Victoria', | 
				
			||||
        '5' => 'Western Australia', | 
				
			||||
        '6' => 'Northern Territory', | 
				
			||||
        '7' => 'Australian Capital Territory', | 
				
			||||
        '8' => 'New South Wales' | 
				
			||||
         | 
				
			||||
    ], | 
				
			||||
    'career_areas' => [ | 
				
			||||
         | 
				
			||||
        '1' => 'Support Workers', | 
				
			||||
        '2' => 'Support Coordination', | 
				
			||||
        '3' => 'Plan Management', | 
				
			||||
        '4' => 'Administration and Management' | 
				
			||||
    ], | 
				
			||||
 | 
				
			||||
    'faqs_types' =>[ | 
				
			||||
        '1' => 'Service', | 
				
			||||
        '2' => 'Academy' | 
				
			||||
    ], | 
				
			||||
    'image_folders'=>[ | 
				
			||||
        '1' =>'setting', | 
				
			||||
        '2' =>'about_us', | 
				
			||||
        '3'=>'service', | 
				
			||||
        '4'=>'slider', | 
				
			||||
        '5' => 'team', | 
				
			||||
        '6' => 'news_and_update', | 
				
			||||
        '7'=>'gallery', | 
				
			||||
        '8'=>'ndis_plan', | 
				
			||||
        '9' => 'testimonial', | 
				
			||||
        '10' => 'visa_service', | 
				
			||||
        '11'=>'applicant', | 
				
			||||
        '12'=>'partner' | 
				
			||||
 | 
				
			||||
    ], | 
				
			||||
    'course_types'=>[ | 
				
			||||
        '1' =>'Upcoming Courses', | 
				
			||||
        '2' =>'Recommended Courses', | 
				
			||||
//        '3'=>'Trending Courses', | 
				
			||||
    ], | 
				
			||||
    'query_types'=>[ | 
				
			||||
        '1' =>'Contact Us', | 
				
			||||
        '2' =>'Quick In Query', | 
				
			||||
    ], | 
				
			||||
    'ndis_plan'=>[ | 
				
			||||
        '1' =>'Self Managed', | 
				
			||||
        '2' =>'Agency Managed', | 
				
			||||
        '3' => 'Plan Managed' | 
				
			||||
    ], | 
				
			||||
    'contact_us_types'=>[ | 
				
			||||
        '1' =>'Course', | 
				
			||||
        '2' =>'Service', | 
				
			||||
    ], | 
				
			||||
    'trending_courses'=>[ | 
				
			||||
        '1' =>'Yes', | 
				
			||||
        '2' =>'No', | 
				
			||||
    ], | 
				
			||||
    'seo_types'=>[ | 
				
			||||
        '1' =>'Project', | 
				
			||||
        '2' =>'Academy', | 
				
			||||
        '3'=>'Blog', | 
				
			||||
        '4'=>'Contact', | 
				
			||||
        '5' => 'Home', | 
				
			||||
        '6'=> 'About', | 
				
			||||
        '7' => 'Faq' | 
				
			||||
    ], | 
				
			||||
    'file_dir'=>'storage_new', | 
				
			||||
    'domain_suffix' =>'np', | 
				
			||||
    'per_page' =>10, | 
				
			||||
]; | 
				
			||||
@ -1,36 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
class CreateSettingsTable extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::create('settings', function (Blueprint $table) { | 
				
			||||
            $table->id(); | 
				
			||||
            $table->string('key'); | 
				
			||||
            $table->string('value'); | 
				
			||||
            $table->string('slug')->unique(); | 
				
			||||
            $table->string('type'); | 
				
			||||
            $table->enum('status',['1','2']); | 
				
			||||
            $table->timestamps(); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::dropIfExists('settings'); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,38 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
class CreateSlidersTable extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::create('sliders', function (Blueprint $table) { | 
				
			||||
            $table->id(); | 
				
			||||
            $table->string('title1'); | 
				
			||||
            $table->string('title2')->nullable(); | 
				
			||||
            $table->longText('description'); | 
				
			||||
            $table->string('image')->nullable(); | 
				
			||||
            $table->string('image_alt')->nullable(); | 
				
			||||
            $table->string('link'); | 
				
			||||
            $table->enum('status',['1','2']); | 
				
			||||
            $table->timestamps(); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::dropIfExists('sliders'); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,47 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
class CreateServicesTable extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::create('services', function (Blueprint $table) { | 
				
			||||
            $table->id(); | 
				
			||||
            $table->string('name'); | 
				
			||||
            // $table->string('image_title'); | 
				
			||||
            // $table->string('image'); | 
				
			||||
            // $table->string('description_title'); | 
				
			||||
            // $table->string('image_description'); | 
				
			||||
            // $table->longText('top_description'); | 
				
			||||
            // $table->longText('bottom_description'); | 
				
			||||
            // $table->string('point_title'); | 
				
			||||
            $table->string('seo_title'); | 
				
			||||
            $table->longText('seo_description'); | 
				
			||||
            $table->string('keywords'); | 
				
			||||
            $table->longText('meta_keywords'); | 
				
			||||
            $table->enum('status',[1,2]); | 
				
			||||
            // $table->string('image_alt')->nullable(); | 
				
			||||
            $table->string('order_by'); | 
				
			||||
            $table->string('slug'); | 
				
			||||
            $table->timestamps(); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::dropIfExists('services'); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,34 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
class CreateServicePointsTable extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::create('service_points', function (Blueprint $table) { | 
				
			||||
            $table->id(); | 
				
			||||
            $table->bigInteger('service_id')->unsigned(); | 
				
			||||
            $table->foreign('service_id')->references('id')->on('services')->onDelete('cascade'); | 
				
			||||
            $table->string('point'); | 
				
			||||
            $table->timestamps(); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::dropIfExists('service_points'); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,50 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
class CreateNewsAndUpdatesTable extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::create('news_and_updates', function (Blueprint $table) { | 
				
			||||
            $table->id(); | 
				
			||||
            $table->integer('blog_type'); | 
				
			||||
            $table->string('image'); | 
				
			||||
            $table->string('image_alt'); | 
				
			||||
            $table->longText('description'); | 
				
			||||
            $table->longText('middle_description')->nullable(); | 
				
			||||
            $table->longText('bottom_description')->nullable(); | 
				
			||||
            $table->string('seo_title')->nullable(); | 
				
			||||
            $table->longText('seo_description')->nullable(); | 
				
			||||
            $table->string('keyword'); | 
				
			||||
            $table->string('slug'); | 
				
			||||
            $table->longText('meta_keyword')->nullable(); | 
				
			||||
            $table->enum('status',['1','2']); // 1 for active , 2 for de-active | 
				
			||||
            $table->date('publish_date'); | 
				
			||||
            $table->string('title'); | 
				
			||||
            $table->string('point_title')->nullable(); | 
				
			||||
            $table->string('image_credit')->nullable(); | 
				
			||||
            $table->string('author')->nullable(); | 
				
			||||
            $table->string('image_caption')->nullable(); | 
				
			||||
            $table->enum('type',['1','2']); //1 for blog, 2 for featured bogs | 
				
			||||
            $table->timestamps(); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::dropIfExists('news_and_updates'); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,34 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
class CreateNewsAndUpdatePointsTable extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::create('news_and_update_points', function (Blueprint $table) { | 
				
			||||
            $table->id(); | 
				
			||||
            $table->bigInteger('news_and_update_id')->unsigned(); | 
				
			||||
            $table->foreign('news_and_update_id')->references('id')->on('news_and_updates'); | 
				
			||||
            $table->string('point'); | 
				
			||||
            $table->timestamps(); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::dropIfExists('news_and_update_points'); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,38 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
class CreateTestimonialsTable extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::create('testimonials', function (Blueprint $table) { | 
				
			||||
            $table->id(); | 
				
			||||
            $table->string('image'); | 
				
			||||
            $table->string('heading')->nullable(); | 
				
			||||
            $table->string('title')->nullable(); | 
				
			||||
            $table->string('author_name'); | 
				
			||||
            $table->string('author_designation'); | 
				
			||||
            $table->longText('review'); | 
				
			||||
            $table->enum('status',['1','2']); | 
				
			||||
            $table->timestamps(); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::dropIfExists('testimonials'); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,37 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
class CreateSeoTitlesTable extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::create('seo_titles', function (Blueprint $table) { | 
				
			||||
            $table->id(); | 
				
			||||
            $table->integer('seo_type'); | 
				
			||||
            $table->string('seo_title')->nullable(); | 
				
			||||
            $table->longText('seo_description')->nullable(); | 
				
			||||
            $table->string('keyword')->nullable(); | 
				
			||||
            $table->longText('meta_keyword')->nullable(); | 
				
			||||
            $table->enum('status',[1,2]); | 
				
			||||
            $table->timestamps(); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::dropIfExists('seo_titles'); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,40 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
class CreateServiceSectionsTable extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::create('service_sections', function (Blueprint $table) { | 
				
			||||
            $table->id(); | 
				
			||||
            $table->bigInteger('service_id')->unsigned(); | 
				
			||||
            $table->foreign('service_id')->references('id')->on('services')->onDelete('cascade'); | 
				
			||||
            $table->string('image')->nullable(); | 
				
			||||
            $table->string('title'); | 
				
			||||
            $table->string('sub_title')->nullable(); | 
				
			||||
            $table->longText('description'); | 
				
			||||
            $table->longText('sub_description')->nullable(); | 
				
			||||
            $table->enum('status',[1,2]); | 
				
			||||
            $table->string('order_by'); | 
				
			||||
            $table->timestamps(); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::dropIfExists('service_sections'); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,34 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
class CreateServiceSectionPointsTable extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::create('service_section_points', function (Blueprint $table) { | 
				
			||||
            $table->id(); | 
				
			||||
            $table->bigInteger('service_section_id')->unsigned(); | 
				
			||||
            $table->foreign('service_section_id')->references('id')->on('service_sections')->onDelete('cascade'); | 
				
			||||
            $table->string('point'); | 
				
			||||
            $table->timestamps(); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::dropIfExists('service_section_points'); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,33 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
class AddShortDescriptionToServicesTable extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::table('services', function (Blueprint $table) { | 
				
			||||
            $table->longText('short_description'); | 
				
			||||
            $table->string('icon')->nullable(); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::table('services', function (Blueprint $table) { | 
				
			||||
            // | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,35 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
class CreateAboutUsTable extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::create('about_us', function (Blueprint $table) { | 
				
			||||
            $table->id(); | 
				
			||||
            $table->string('image'); | 
				
			||||
            $table->string('title')->nullable(); | 
				
			||||
            $table->longText('description'); | 
				
			||||
            $table->longText('sub_description')->nullable(); | 
				
			||||
            $table->timestamps(); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::dropIfExists('about_us'); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,34 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
class CreateAboutUsPointsTable extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::create('about_us_points', function (Blueprint $table) { | 
				
			||||
            $table->id(); | 
				
			||||
            $table->bigInteger('about_us_id')->unsigned(); | 
				
			||||
            $table->foreign('about_us_id')->references('id')->on('about_us'); | 
				
			||||
            $table->string('point'); | 
				
			||||
            $table->timestamps(); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::dropIfExists('about_us_points'); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,37 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
class AddSeoFieldsToAboutUsTable extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::table('about_us', function (Blueprint $table) { | 
				
			||||
            $table->string('seo_title')->nullable(); | 
				
			||||
            $table->longText('seo_description')->nullable(); | 
				
			||||
            $table->string('keyword'); | 
				
			||||
            $table->string('slug'); | 
				
			||||
            $table->longText('meta_keyword')->nullable(); | 
				
			||||
            $table->enum('status',['1','2']); // 1 for active , 2 for de-active | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::table('about_us', function (Blueprint $table) { | 
				
			||||
            // | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,38 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
class CreateTeamsTable extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::create('teams', function (Blueprint $table) { | 
				
			||||
            $table->id(); | 
				
			||||
            $table->string('team_name'); | 
				
			||||
            $table->string('email')->unique()->nullable(); | 
				
			||||
            $table->string('mobile_no')->nullable(); | 
				
			||||
            $table->string('address')->nullable(); | 
				
			||||
            $table->string('image'); | 
				
			||||
            $table->string('designation'); | 
				
			||||
            $table->enum('status',[1,2]); | 
				
			||||
            $table->timestamps(); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::dropIfExists('teams'); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,39 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
class CreateContactsTable extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::create('contacts', function (Blueprint $table) { | 
				
			||||
            $table->id(); | 
				
			||||
            $table->bigInteger('service_id')->unsigned()->nullable(); | 
				
			||||
            $table->foreign('service_id')->references('id')->on('services')->nullable(); | 
				
			||||
            $table->string('fullname'); | 
				
			||||
            // $table->string('last_name'); | 
				
			||||
            $table->string('email'); | 
				
			||||
            $table->string('phone'); | 
				
			||||
            $table->string('message'); | 
				
			||||
            $table->boolean('status')->default(true); | 
				
			||||
            $table->timestamps(); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::dropIfExists('contacts'); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,42 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
class CreateCareersTable extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::create('careers', function (Blueprint $table) { | 
				
			||||
            $table->id(); | 
				
			||||
            $table->string('title')->nullable(); | 
				
			||||
            $table->longtext('sub_title')->nullable(); | 
				
			||||
            $table->longtext('point_title')->nullable(); | 
				
			||||
            $table->longtext('description')->nullable(); | 
				
			||||
            $table->longtext('sub_description')->nullable(); | 
				
			||||
            $table->string('seo_title')->nullable(); | 
				
			||||
            $table->longText('seo_description')->nullable(); | 
				
			||||
            $table->string('keyword'); | 
				
			||||
            $table->string('slug'); | 
				
			||||
            $table->longText('meta_keyword')->nullable(); | 
				
			||||
            $table->enum('status',['1','2']); | 
				
			||||
            $table->timestamps(); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::dropIfExists('careers'); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,34 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
class CreateCareerPointsTable extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::create('career_points', function (Blueprint $table) { | 
				
			||||
            $table->id(); | 
				
			||||
            $table->bigInteger('career_id')->unsigned(); | 
				
			||||
            $table->foreign('career_id')->references('id')->on('careers'); | 
				
			||||
            $table->longtext('point'); | 
				
			||||
            $table->timestamps(); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::dropIfExists('career_points'); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,32 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
class AddImageToCareersTable extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::table('careers', function (Blueprint $table) { | 
				
			||||
            $table->string('image')->nullable(); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::table('careers', function (Blueprint $table) { | 
				
			||||
            // | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,35 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
class CreateSubscriptionsTable extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::create('subscriptions', function (Blueprint $table) { | 
				
			||||
            $table->id(); | 
				
			||||
            $table->string('email'); | 
				
			||||
            $table->string('name')->nullable(); | 
				
			||||
            $table->timestamp('email_verified_at')->nullable(); | 
				
			||||
            $table->boolean('status')->nullable()->default(true); | 
				
			||||
            $table->timestamps(); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::dropIfExists('subscriptions'); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,33 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
class AddDesIconToServiceSectionPointsTable extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::table('service_section_points', function (Blueprint $table) { | 
				
			||||
            $table->string('point_description')->nullable(); | 
				
			||||
            $table->string('icon')->nullable(); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::table('service_section_points', function (Blueprint $table) { | 
				
			||||
            // | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,34 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
return new class extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::create('setting_image_alts', function (Blueprint $table) { | 
				
			||||
            $table->id(); | 
				
			||||
            $table->bigInteger('setting_id')->unsigned(); | 
				
			||||
            $table->foreign('setting_id')->references('id')->on('settings')->onDelete('cascade'); | 
				
			||||
            $table->string('image_alt')->nullable(); | 
				
			||||
            $table->timestamps(); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::dropIfExists('setting_image_alts'); | 
				
			||||
    } | 
				
			||||
}; | 
				
			||||
@ -1,36 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
class CreateJobsTable extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::create('jobs', function (Blueprint $table) { | 
				
			||||
            $table->bigIncrements('id'); | 
				
			||||
            $table->string('queue')->index(); | 
				
			||||
            $table->longText('payload'); | 
				
			||||
            $table->unsignedTinyInteger('attempts'); | 
				
			||||
            $table->unsignedInteger('reserved_at')->nullable(); | 
				
			||||
            $table->unsignedInteger('available_at'); | 
				
			||||
            $table->unsignedInteger('created_at'); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::dropIfExists('jobs'); | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,33 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
return new class extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::table('about_us', function (Blueprint $table) { | 
				
			||||
            $table->string('point_title')->nullable(); | 
				
			||||
            $table->string('bottom_title')->nullable(); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::table('about_us', function (Blueprint $table) { | 
				
			||||
            // | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
}; | 
				
			||||
@ -1,36 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
return new class extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::create('partners', function (Blueprint $table) { | 
				
			||||
            $table->id(); | 
				
			||||
            $table->string('image'); | 
				
			||||
            $table->string('title')->nullable(); | 
				
			||||
            $table->string('sub_title')->nullable(); | 
				
			||||
            $table->string('name')->nullable(); | 
				
			||||
            $table->enum('status',['1','2']); | 
				
			||||
            $table->timestamps(); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::dropIfExists('partners'); | 
				
			||||
    } | 
				
			||||
}; | 
				
			||||
@ -1,36 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
return new class extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::create('recruitments', function (Blueprint $table) { | 
				
			||||
            $table->id(); | 
				
			||||
            $table->string('full_name'); | 
				
			||||
            $table->string('company'); | 
				
			||||
            $table->string('email'); | 
				
			||||
            $table->string('no_of_position'); | 
				
			||||
            $table->text('enquiry')->nullable(); | 
				
			||||
            $table->timestamps(); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::dropIfExists('recruitments'); | 
				
			||||
    } | 
				
			||||
}; | 
				
			||||
@ -1,41 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
return new class extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::create('visa_services', function (Blueprint $table) { | 
				
			||||
            $table->id(); | 
				
			||||
            $table->string('name'); | 
				
			||||
            $table->string('seo_title'); | 
				
			||||
            $table->longText('seo_description'); | 
				
			||||
            $table->string('keywords'); | 
				
			||||
            $table->longText('meta_keywords'); | 
				
			||||
            $table->enum('status',[1,2]); | 
				
			||||
            $table->longText('short_description'); | 
				
			||||
            $table->string('icon')->nullable(); | 
				
			||||
            $table->string('order_by'); | 
				
			||||
            $table->string('slug'); | 
				
			||||
            $table->timestamps(); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::dropIfExists('visa_services'); | 
				
			||||
    } | 
				
			||||
}; | 
				
			||||
@ -1,45 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
return new class extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::create('visa_service_sections', function (Blueprint $table) { | 
				
			||||
            $table->id(); | 
				
			||||
            $table->bigInteger('visa_service_id')->unsigned(); | 
				
			||||
            $table->foreign('visa_service_id')->references('id')->on('visa_services')->onDelete('cascade'); | 
				
			||||
            $table->longText('top_description')->nullable(); | 
				
			||||
            $table->string('image')->nullable(); | 
				
			||||
            $table->string('left_title'); | 
				
			||||
            $table->string('left_sub_title'); | 
				
			||||
            $table->longText('left_description'); | 
				
			||||
            $table->string('right_title')->nullable(); | 
				
			||||
            $table->string('right_sub_title')->nullable(); | 
				
			||||
            // $table->longText('sub_description')->nullable(); | 
				
			||||
            $table->longText('point_title')->nullable(); | 
				
			||||
            $table->string('visa_length')->nullable(); | 
				
			||||
            $table->enum('status',[1,2]); | 
				
			||||
            $table->string('order_by'); | 
				
			||||
            $table->timestamps(); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::dropIfExists('visa_service_sections'); | 
				
			||||
    } | 
				
			||||
}; | 
				
			||||
@ -1,34 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
return new class extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::create('visa_service_section_points', function (Blueprint $table) { | 
				
			||||
            $table->id(); | 
				
			||||
            $table->bigInteger('visa_service_section_id')->unsigned(); | 
				
			||||
            $table->foreign('visa_service_section_id')->references('id')->on('visa_service_sections')->onDelete('cascade'); | 
				
			||||
            $table->text('point'); | 
				
			||||
            $table->timestamps(); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::dropIfExists('visa_service_section_points'); | 
				
			||||
    } | 
				
			||||
}; | 
				
			||||
@ -1,38 +0,0 @@ | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use Illuminate\Database\Migrations\Migration; | 
				
			||||
use Illuminate\Database\Schema\Blueprint; | 
				
			||||
use Illuminate\Support\Facades\Schema; | 
				
			||||
 | 
				
			||||
return new class extends Migration | 
				
			||||
{ | 
				
			||||
    /** | 
				
			||||
     * Run the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function up() | 
				
			||||
    { | 
				
			||||
        Schema::create('applicants', function (Blueprint $table) { | 
				
			||||
            $table->id(); | 
				
			||||
            $table->string('full_name'); | 
				
			||||
            $table->string('phone'); | 
				
			||||
            $table->string('email'); | 
				
			||||
            $table->boolean('has_visa_permit'); | 
				
			||||
            $table->boolean('has_skill_assessed'); | 
				
			||||
            $table->string('resume'); | 
				
			||||
            $table->string('country'); | 
				
			||||
            $table->timestamps(); | 
				
			||||
        }); | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * Reverse the migrations. | 
				
			||||
     * | 
				
			||||
     * @return void | 
				
			||||
     */ | 
				
			||||
    public function down() | 
				
			||||
    { | 
				
			||||
        Schema::dropIfExists('applicants'); | 
				
			||||
    } | 
				
			||||
}; | 
				
			||||
Some files were not shown because too many files have changed in this diff Show More
					Loading…
					
					
				
		Reference in new issue