admin-panel-setup

et#3
Mahesh Sharma 2 years ago
parent 07fc02b1ba
commit 134927d2df
  1. 216
      app/Http/Controllers/Admin/AboutUsController.php
  2. 278
      app/Http/Controllers/Admin/AccomodationController.php
  3. 112
      app/Http/Controllers/Admin/AddSectionController.php
  4. 27
      app/Http/Controllers/Admin/ApplicantController.php
  5. 206
      app/Http/Controllers/Admin/CareerController.php
  6. 89
      app/Http/Controllers/Admin/ClientController.php
  7. 99
      app/Http/Controllers/Admin/ContactUsController.php
  8. 62
      app/Http/Controllers/Admin/DepartmentController.php
  9. 37
      app/Http/Controllers/Admin/EnrollmentController.php
  10. 152
      app/Http/Controllers/Admin/GalleryController.php
  11. 95
      app/Http/Controllers/Admin/HomeController.php
  12. 206
      app/Http/Controllers/Admin/NewsAndUpdateController.php
  13. 121
      app/Http/Controllers/Admin/PartnerController.php
  14. 33
      app/Http/Controllers/Admin/ReferralController.php
  15. 66
      app/Http/Controllers/Admin/SeoTitleController.php
  16. 291
      app/Http/Controllers/Admin/ServiceController.php
  17. 66
      app/Http/Controllers/Admin/ServiceFaqController.php
  18. 294
      app/Http/Controllers/Admin/ServiceSectionController.php
  19. 184
      app/Http/Controllers/Admin/SettingController.php
  20. 184
      app/Http/Controllers/Admin/SliderController.php
  21. 98
      app/Http/Controllers/Admin/SubOfficeController.php
  22. 49
      app/Http/Controllers/Admin/SubscriptionController.php
  23. 93
      app/Http/Controllers/Admin/TeamController.php
  24. 116
      app/Http/Controllers/Admin/TestimonialController.php
  25. 265
      app/Http/Controllers/Admin/VisaServiceController.php
  26. 281
      app/Http/Controllers/Admin/VisaServiceSectionController.php
  27. 14
      app/Http/Controllers/HomeController.php
  28. 16
      app/Models/AboutUs.php
  29. 16
      app/Models/AboutUsPoint.php
  30. 31
      app/Models/Accomodation.php
  31. 11
      app/Models/AccomodationFeature.php
  32. 11
      app/Models/AccomodationImage.php
  33. 12
      app/Models/AccomodationInformation.php
  34. 12
      app/Models/AccomodationSliderTitle.php
  35. 16
      app/Models/Applicant.php
  36. 13
      app/Models/ApplicantService.php
  37. 15
      app/Models/Career.php
  38. 11
      app/Models/CareerPoint.php
  39. 17
      app/Models/Contact.php
  40. 13
      app/Models/Gallery.php
  41. 17
      app/Models/NewsAndUpdate.php
  42. 11
      app/Models/NewsAndUpdatePoint.php
  43. 13
      app/Models/Partner.php
  44. 11
      app/Models/Recruitment.php
  45. 16
      app/Models/Referral.php
  46. 13
      app/Models/ReferralService.php
  47. 12
      app/Models/SeoTitle.php
  48. 15
      app/Models/Service.php
  49. 18
      app/Models/ServiceSection.php
  50. 16
      app/Models/ServiceSectionPoint.php
  51. 60
      app/Models/Setting.php
  52. 13
      app/Models/SettingImageAlt.php
  53. 11
      app/Models/Slider.php
  54. 11
      app/Models/Subscription.php
  55. 11
      app/Models/SupportCoordination.php
  56. 12
      app/Models/Team.php
  57. 12
      app/Models/Testimonial.php
  58. 211
      app/Models/User.php
  59. 15
      app/Models/VisaService.php
  60. 18
      app/Models/VisaServiceSection.php
  61. 16
      app/Models/VisaServiceSectionPoint.php
  62. 3
      composer.json
  63. 76
      composer.lock
  64. 90
      config/custom.php
  65. 38
      database/migrations/2022_07_06_083544_create_sliders_table.php
  66. 47
      database/migrations/2022_07_06_091450_create_services_table.php
  67. 34
      database/migrations/2022_07_06_093348_create_service_points_table.php
  68. 50
      database/migrations/2022_07_07_033018_create_news_and_updates_table.php
  69. 34
      database/migrations/2022_07_07_034216_create_news_and_update_points_table.php
  70. 38
      database/migrations/2022_07_07_065806_create_testimonials_table.php
  71. 37
      database/migrations/2022_07_07_072228_create_seo_titles_table.php
  72. 40
      database/migrations/2022_07_08_075450_create_service_sections_table.php
  73. 34
      database/migrations/2022_07_08_080031_create_service_section_points_table.php
  74. 33
      database/migrations/2022_07_11_080839_add_short_description_to_services_table.php
  75. 35
      database/migrations/2022_07_11_150527_create_about_us_table.php
  76. 34
      database/migrations/2022_07_11_150815_create_about_us_points_table.php
  77. 37
      database/migrations/2022_07_11_152552_add_seo_fields_to_about_us_table.php
  78. 38
      database/migrations/2022_07_11_170117_create_teams_table.php
  79. 39
      database/migrations/2022_07_13_071039_create_contacts_table.php
  80. 42
      database/migrations/2022_07_19_014644_create_careers_table.php
  81. 34
      database/migrations/2022_07_19_020352_create_career_points_table.php
  82. 32
      database/migrations/2022_07_19_030046_add_image_to_careers_table.php
  83. 35
      database/migrations/2022_07_19_080620_create_subscriptions_table.php
  84. 33
      database/migrations/2022_07_29_073833_add_des_icon_to_service_section_points_table.php
  85. 34
      database/migrations/2022_07_6_082324_create_setting_image_alts_table.php
  86. 36
      database/migrations/2022_08_26_032614_create_settings_table.php
  87. 36
      database/migrations/2022_09_20_184931_create_jobs_table.php
  88. 33
      database/migrations/2022_11_22_050244_add_point_title_to_abouts_us.php
  89. 36
      database/migrations/2022_12_06_100723_create_partners_table.php
  90. 36
      database/migrations/2022_12_07_041318_create_recruitments_table.php
  91. 41
      database/migrations/2022_12_12_093112_create_visa_services_table.php
  92. 45
      database/migrations/2022_12_13_035944_create_visa_service_sections_table.php
  93. 34
      database/migrations/2022_12_13_043238_create_visa_service_section_points_table.php
  94. 38
      database/migrations/2022_12_13_071803_create_applicants_table.php
  95. 32
      database/migrations/2022_12_14_063910_add_image_to_services_table.php
  96. 32
      database/migrations/2022_12_14_071738_add_image_to_visa_services_table.php
  97. 32
      database/migrations/2022_12_14_093317_add_thumbnai_to_news_and_updates_table.php
  98. 32
      database/migrations/2022_12_15_060949_add_banner_image_to_services_table.php
  99. 9
      database/seeders/DatabaseSeeder.php
  100. 28
      database/seeders/UserTableSeeder.php
  101. Some files were not shown because too many files have changed in this diff Show More

@ -0,0 +1,216 @@
<?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);
}
}

@ -0,0 +1,278 @@
<?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]);
}
}
}

@ -0,0 +1,112 @@
<?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);
}
//
}

@ -0,0 +1,27 @@
<?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'));
}
}

@ -0,0 +1,206 @@
<?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);
}
}

@ -0,0 +1,89 @@
<?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);
}
}

@ -0,0 +1,99 @@
<?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);
}
}
}

@ -0,0 +1,62 @@
<?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(){
}
}

@ -0,0 +1,37 @@
<?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'));
}
}

@ -0,0 +1,152 @@
<?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]);
// }
// }
}

@ -0,0 +1,95 @@
<?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.');
}
}

@ -0,0 +1,206 @@
<?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]);
}
}
}

@ -0,0 +1,121 @@
<?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);
}
}

@ -0,0 +1,33 @@
<?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'));
}
}

@ -0,0 +1,66 @@
<?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);
}
//
}

@ -0,0 +1,291 @@
<?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]);
}
}
}

@ -0,0 +1,66 @@
<?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);
}
}

@ -0,0 +1,294 @@
<?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]);
}
}
}

@ -0,0 +1,184 @@
<?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");
}
}

@ -0,0 +1,184 @@
<?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);
}
}

@ -0,0 +1,98 @@
<?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);
}
}

@ -0,0 +1,49 @@
<?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);
}
//
}

@ -0,0 +1,93 @@
<?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);
}
}

@ -0,0 +1,116 @@
<?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");
}
}

@ -0,0 +1,265 @@
<?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]);
}
}
}

@ -0,0 +1,281 @@
<?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]);
}
}
}

@ -0,0 +1,14 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Slider;
class HomeController extends Controller
{
public function index(){
$sliders = Slider::where('status',1)->get();
return view('welcome',compact('sliders'));
}
}

@ -0,0 +1,16 @@
<?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);
}
}

@ -0,0 +1,16 @@
<?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);
}
}

@ -0,0 +1,31 @@
<?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);
}
}

@ -0,0 +1,11 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class AccomodationFeature extends Model
{
use HasFactory;
}

@ -0,0 +1,11 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class AccomodationImage extends Model
{
use HasFactory;
}

@ -0,0 +1,12 @@
<?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';
}

@ -0,0 +1,12 @@
<?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';
}

@ -0,0 +1,16 @@
<?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);
}
}

@ -0,0 +1,13 @@
<?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";
}

@ -0,0 +1,15 @@
<?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);
}
}

@ -0,0 +1,11 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class CareerPoint extends Model
{
use HasFactory;
}

@ -0,0 +1,17 @@
<?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);
}
}

@ -0,0 +1,13 @@
<?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'];
}

@ -0,0 +1,17 @@
<?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');
}
}

@ -0,0 +1,11 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class NewsAndUpdatePoint extends Model
{
use HasFactory;
}

@ -0,0 +1,13 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Partner extends Model
{
use HasFactory;
protected $guarded = ['id'];
}

@ -0,0 +1,11 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Recruitment extends Model
{
use HasFactory;
}

@ -0,0 +1,16 @@
<?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');
}
}

@ -0,0 +1,13 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ReferralService extends Model
{
use HasFactory;
}

@ -0,0 +1,12 @@
<?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'];
}

@ -0,0 +1,15 @@
<?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);
}
}

@ -0,0 +1,18 @@
<?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);
}
}

@ -0,0 +1,16 @@
<?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);
}
}

@ -0,0 +1,60 @@
<?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;
}
}

@ -0,0 +1,13 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class SettingImageAlt extends Model
{
use HasFactory;
}

@ -0,0 +1,11 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Slider extends Model
{
use HasFactory;
}

@ -0,0 +1,11 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Subscription extends Model
{
use HasFactory;
}

@ -0,0 +1,11 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class SupportCoordination extends Model
{
use HasFactory;
}

@ -0,0 +1,12 @@
<?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'];
}

@ -0,0 +1,12 @@
<?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;
}

@ -2,7 +2,7 @@
namespace App\Models; namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail; use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable; use Illuminate\Notifications\Notifiable;
@ -41,4 +41,213 @@ class User extends Authenticatable
protected $casts = [ protected $casts = [
'email_verified_at' => 'datetime', 'email_verified_at' => 'datetime',
]; ];
public static function makeDirectory($image_folder_type)
{
// $image_folder_type = 1;
$year = date("Y");
$month = date("m");
$day = date("d");
if(config('custom.image_folders')[$image_folder_type] == 'setting'){
if (!is_dir(public_path().'/images/setting/'.$year.'/'.$month.'/'.$day)) {
mkdir(public_path().'/images/setting/'.$year.'/'.$month.'/'.$day, 0755, true);
}
return $directory = 'images/setting/'.$year.'/'.$month.'/'.$day.'/';
}
if(config('custom.image_folders')[$image_folder_type] == 'project'){
if (!is_dir(public_path().'/images/project/'.$year.'/'.$month.'/'.$day)) {
mkdir(public_path().'/images/project/'.$year.'/'.$month.'/'.$day, 0755, true);
}
return $directory = 'images/project/'.$year.'/'.$month.'/'.$day.'/';
}
if(config('custom.image_folders')[$image_folder_type] == 'ndis_plan'){
if (!is_dir(public_path().'/images/ndis_plan/'.$year.'/'.$month.'/'.$day)) {
mkdir(public_path().'/images/ndis_plan/'.$year.'/'.$month.'/'.$day, 0755, true);
}
return $directory = 'images/ndis_plan/'.$year.'/'.$month.'/'.$day.'/';
}
if(config('custom.image_folders')[$image_folder_type] == 'service'){
if (!is_dir(public_path().'/images/service/'.$year.'/'.$month.'/'.$day)) {
mkdir(public_path().'/images/service/'.$year.'/'.$month.'/'.$day, 0755, true);
}
return $directory = 'images/service/'.$year.'/'.$month.'/'.$day.'/';
}
if(config('custom.image_folders')[$image_folder_type] == 'gallery'){
if (!is_dir(public_path().'/images/gallery/'.$year.'/'.$month.'/'.$day)) {
mkdir(public_path().'/images/gallery/'.$year.'/'.$month.'/'.$day, 0755, true);
}
return $directory = 'images/gallery/'.$year.'/'.$month.'/'.$day.'/';
}
if(config('custom.image_folders')[$image_folder_type] == 'academy'){
if (!is_dir(public_path().'/images/academy/'.$year.'/'.$month.'/'.$day)) {
mkdir(public_path().'/images/academy/'.$year.'/'.$month.'/'.$day, 0755, true);
}
return $directory = 'images/academy/'.$year.'/'.$month.'/'.$day.'/';
}
if(config('custom.image_folders')[$image_folder_type] == 'news_and_update'){
if (!is_dir(public_path().'/images/news_and_update/'.$year.'/'.$month.'/'.$day)) {
mkdir(public_path().'/images/news_and_update/'.$year.'/'.$month.'/'.$day, 0755, true);
}
return $directory = 'images/news_and_update/'.$year.'/'.$month.'/'.$day.'/';
}
if(config('custom.image_folders')[$image_folder_type] == 'academy_course'){
if (!is_dir(public_path().'/images/academy_course/'.$year.'/'.$month.'/'.$day)) {
mkdir(public_path().'/images/academy_course/'.$year.'/'.$month.'/'.$day, 0755, true);
}
return $directory = 'images/academy_course/'.$year.'/'.$month.'/'.$day.'/';
}
if(config('custom.image_folders')[$image_folder_type] == 'sub_office'){
if (!is_dir(public_path().'/images/sub_office/'.$year.'/'.$month.'/'.$day)) {
mkdir(public_path().'/images/sub_office/'.$year.'/'.$month.'/'.$day, 0755, true);
}
return $directory = 'images/sub_office/'.$year.'/'.$month.'/'.$day.'/';
}
if(config('custom.image_folders')[$image_folder_type] == 'testimonial'){
if (!is_dir(public_path().'/images/testimonial/'.$year.'/'.$month.'/'.$day)) {
mkdir(public_path().'/images/testimonial/'.$year.'/'.$month.'/'.$day, 0755, true);
}
return $directory = 'images/testimonial/'.$year.'/'.$month.'/'.$day.'/';
}
if(config('custom.image_folders')[$image_folder_type] == 'client'){
if (!is_dir(public_path().'/images/client/'.$year.'/'.$month.'/'.$day)) {
mkdir(public_path().'/images/client/'.$year.'/'.$month.'/'.$day, 0755, true);
}
return $directory = 'images/client/'.$year.'/'.$month.'/'.$day.'/';
}
if(config('custom.image_folders')[$image_folder_type] == 'slider') {
if (!is_dir(public_path() . '/images/slider/' . $year . '/' . $month . '/' . $day)) {
mkdir(public_path() . '/images/slider/' . $year . '/' . $month . '/' . $day, 0755, true);
}
return $directory = 'images/slider/' . $year . '/' . $month . '/' . $day . '/';
}
if(config('custom.image_folders')[$image_folder_type] == 'add_section') {
if (!is_dir(public_path() . '/images/add_section/' . $year . '/' . $month . '/' . $day)) {
mkdir(public_path() . '/images/add_section/' . $year . '/' . $month . '/' . $day, 0755, true);
}
return $directory = 'images/add_section/' . $year . '/' . $month . '/' . $day . '/';
}
if(config('custom.image_folders')[$image_folder_type] == 'placement') {
if (!is_dir(public_path() . '/images/placement/' . $year . '/' . $month . '/' . $day)) {
mkdir(public_path() . '/images/placement/' . $year . '/' . $month . '/' . $day, 0755, true);
}
return $directory = 'images/placement/' . $year . '/' . $month . '/' . $day . '/';
}
if(config('custom.image_folders')[$image_folder_type] == 'accomodation') {
if (!is_dir(public_path() . '/images/accomodation/' . $year . '/' . $month . '/' . $day)) {
mkdir(public_path() . '/images/accomodation/' . $year . '/' . $month . '/' . $day, 0755, true);
}
return $directory = 'images/accomodation/' . $year . '/' . $month . '/' . $day . '/';
}
if(config('custom.image_folders')[$image_folder_type] == 'applicant') {
if (!is_dir(public_path() . '/images/applicant/' . $year . '/' . $month . '/' . $day)) {
mkdir(public_path() . '/images/applicant/' . $year . '/' . $month . '/' . $day, 0755, true);
}
return $directory = 'images/applicant/' . $year . '/' . $month . '/' . $day . '/';
}
if(config('custom.image_folders')[$image_folder_type] == 'partner') {
if (!is_dir(public_path() . '/images/partner/' . $year . '/' . $month . '/' . $day)) {
mkdir(public_path() . '/images/partner/' . $year . '/' . $month . '/' . $day, 0755, true);
}
return $directory = 'images/partner/' . $year . '/' . $month . '/' . $day . '/';
}
if(config('custom.image_folders')[$image_folder_type] == 'visa_service') {
if (!is_dir(public_path() . '/images/visa_service/' . $year . '/' . $month . '/' . $day)) {
mkdir(public_path() . '/images/visa_service/' . $year . '/' . $month . '/' . $day, 0755, true);
}
return $directory = 'images/visa_service/' . $year . '/' . $month . '/' . $day . '/';
}
}
public static function save_image($requestData,$extension,$count,$image_folder_type)
{
$directory = self::makeDirectory($image_folder_type);
$uploaded_name = $requestData->getClientOriginalName();
$uploaded_ext = $requestData->getClientOriginalExtension();
$uploaded_type = $requestData->getClientMimeType();
$uploaded_tmp = $requestData->getPathname();
// Where are we going to be writing to?
$target_path = $directory;
//$target_file = basename( $uploaded_name, '.' . $uploaded_ext ) . '-';
$target_file = md5( uniqid() . $uploaded_name ) . '.' . $uploaded_ext;
$temp_file = ( ( ini_get( 'upload_tmp_dir' ) == '' ) ? ( sys_get_temp_dir() ) : ( ini_get( 'upload_tmp_dir' ) ) );
$temp_file .= DIRECTORY_SEPARATOR . md5( uniqid() . $uploaded_name ) . '.' . $uploaded_ext;
// Is it an image?
if( ( strtolower( $uploaded_ext ) == 'jpg' || strtolower( $uploaded_ext ) == 'jpeg' || strtolower( $uploaded_ext ) == 'png' ) &&
( $uploaded_type == 'image/jpeg' || $uploaded_type == 'image/png' ) &&
getimagesize( $uploaded_tmp ) ) {
// Strip any metadata, by re-encoding image (Note, using php-Imagick is recommended over php-GD)
if( $uploaded_type == 'image/jpeg' ) {
$img = imagecreatefromjpeg( $uploaded_tmp );
imagejpeg( $img, $temp_file);
}
else {
$imagedata = getimagesize($requestData);
$width = $imagedata[0];
$height = $imagedata[1];
$img = imagecreatefrompng( $uploaded_tmp );
$new_image = imagecreatetruecolor ( $width, $height );
imagealphablending($new_image , false);
imagesavealpha($new_image , true);
imagecopyresampled ( $new_image, $img, 0, 0, 0, 0, $width, $height, imagesx ( $img ), imagesy ( $img ) );
$img = $new_image;
// saving
imagealphablending($img , false);
imagesavealpha($img , true);
imagepng ( $img, $temp_file);
// imagepng( $img, $temp_file, 100);
}
imagedestroy( $img);
//moving image
if( rename( $temp_file, ( $target_path . $target_file ) ) ) {
$image_path = $target_path . $target_file;
$doc_name = md5(date('Ymd').'_@id'.$count.uniqid());
return [$image_path,$doc_name];
}
}
if(strtolower( $uploaded_ext ) == 'svg' && $uploaded_type =='image/svg+xml'){
$target_path = $target_path;
$content = file_get_contents($requestData);
if(file_put_contents( $target_path.$target_file,$content)){
return($target_path.$target_file);
}
}
if(strtolower( $uploaded_ext ) == 'docx' || strtolower( $uploaded_ext ) == 'pdf'){
$target_path = $target_path;
$content = file_get_contents($requestData);
if(file_put_contents( $target_path.$target_file,$content)){
return($target_path.$target_file);
}
}
if(strtolower( $uploaded_ext ) == 'docx' || strtolower( $uploaded_ext ) == 'pdf'){
$target_path = $target_path;
$content = file_get_contents($requestData);
if(file_put_contents( $target_path.$target_file,$content)){
return($target_path.$target_file);
}
}
if(strtolower( $uploaded_ext ) == 'mp4' || strtolower( $uploaded_ext ) == 'pdf'){
$target_path = $target_path;
$content = file_get_contents($requestData);
if(file_put_contents( $target_path.$target_file,$content)){
return($target_path.$target_file);
}
}
}
} }

@ -0,0 +1,15 @@
<?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);
}
}

@ -0,0 +1,18 @@
<?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);
}
}

@ -0,0 +1,16 @@
<?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);
}
}

@ -9,7 +9,8 @@
"guzzlehttp/guzzle": "^7.2", "guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^9.19", "laravel/framework": "^9.19",
"laravel/sanctum": "^3.0", "laravel/sanctum": "^3.0",
"laravel/tinker": "^2.7" "laravel/tinker": "^2.7",
"laravelcollective/html": "^6.3"
}, },
"require-dev": { "require-dev": {
"fakerphp/faker": "^1.9.1", "fakerphp/faker": "^1.9.1",

76
composer.lock generated

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "ccbd816a07b206f971042295b899d1ba", "content-hash": "f70c81adf2990f185a8632535bd08631",
"packages": [ "packages": [
{ {
"name": "brick/math", "name": "brick/math",
@ -1321,6 +1321,78 @@
}, },
"time": "2023-01-10T18:03:30+00:00" "time": "2023-01-10T18:03:30+00:00"
}, },
{
"name": "laravelcollective/html",
"version": "v6.3.0",
"source": {
"type": "git",
"url": "https://github.com/LaravelCollective/html.git",
"reference": "78c3cb516ac9e6d3d76cad9191f81d217302dea6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/LaravelCollective/html/zipball/78c3cb516ac9e6d3d76cad9191f81d217302dea6",
"reference": "78c3cb516ac9e6d3d76cad9191f81d217302dea6",
"shasum": ""
},
"require": {
"illuminate/http": "^6.0|^7.0|^8.0|^9.0",
"illuminate/routing": "^6.0|^7.0|^8.0|^9.0",
"illuminate/session": "^6.0|^7.0|^8.0|^9.0",
"illuminate/support": "^6.0|^7.0|^8.0|^9.0",
"illuminate/view": "^6.0|^7.0|^8.0|^9.0",
"php": ">=7.2.5"
},
"require-dev": {
"illuminate/database": "^6.0|^7.0|^8.0|^9.0",
"mockery/mockery": "~1.0",
"phpunit/phpunit": "~8.5|^9.5.10"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "6.x-dev"
},
"laravel": {
"providers": [
"Collective\\Html\\HtmlServiceProvider"
],
"aliases": {
"Form": "Collective\\Html\\FormFacade",
"Html": "Collective\\Html\\HtmlFacade"
}
}
},
"autoload": {
"files": [
"src/helpers.php"
],
"psr-4": {
"Collective\\Html\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Adam Engebretson",
"email": "adam@laravelcollective.com"
},
{
"name": "Taylor Otwell",
"email": "taylorotwell@gmail.com"
}
],
"description": "HTML and Form Builders for the Laravel Framework",
"homepage": "https://laravelcollective.com",
"support": {
"issues": "https://github.com/LaravelCollective/html/issues",
"source": "https://github.com/LaravelCollective/html"
},
"time": "2022-02-08T21:02:54+00:00"
},
{ {
"name": "league/commonmark", "name": "league/commonmark",
"version": "2.3.8", "version": "2.3.8",
@ -7811,5 +7883,5 @@
"php": "^8.0.2" "php": "^8.0.2"
}, },
"platform-dev": [], "platform-dev": [],
"plugin-api-version": "2.3.0" "plugin-api-version": "2.1.0"
} }

@ -0,0 +1,90 @@
<?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,
];

@ -0,0 +1,38 @@
<?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');
}
}

@ -0,0 +1,47 @@
<?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');
}
}

@ -0,0 +1,34 @@
<?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');
}
}

@ -0,0 +1,50 @@
<?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');
}
}

@ -0,0 +1,34 @@
<?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');
}
}

@ -0,0 +1,38 @@
<?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');
}
}

@ -0,0 +1,37 @@
<?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');
}
}

@ -0,0 +1,40 @@
<?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');
}
}

@ -0,0 +1,34 @@
<?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');
}
}

@ -0,0 +1,33 @@
<?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) {
//
});
}
}

@ -0,0 +1,35 @@
<?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');
}
}

@ -0,0 +1,34 @@
<?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');
}
}

@ -0,0 +1,37 @@
<?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) {
//
});
}
}

@ -0,0 +1,38 @@
<?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');
}
}

@ -0,0 +1,39 @@
<?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');
}
}

@ -0,0 +1,42 @@
<?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');
}
}

@ -0,0 +1,34 @@
<?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');
}
}

@ -0,0 +1,32 @@
<?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) {
//
});
}
}

@ -0,0 +1,35 @@
<?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');
}
}

@ -0,0 +1,33 @@
<?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) {
//
});
}
}

@ -0,0 +1,34 @@
<?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');
}
};

@ -0,0 +1,36 @@
<?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');
}
}

@ -0,0 +1,36 @@
<?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');
}
}

@ -0,0 +1,33 @@
<?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) {
//
});
}
};

@ -0,0 +1,36 @@
<?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');
}
};

@ -0,0 +1,36 @@
<?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');
}
};

@ -0,0 +1,41 @@
<?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');
}
};

@ -0,0 +1,45 @@
<?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');
}
};

@ -0,0 +1,34 @@
<?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');
}
};

@ -0,0 +1,38 @@
<?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');
}
};

@ -0,0 +1,32 @@
<?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('services', function (Blueprint $table) {
$table->string('image');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('services', function (Blueprint $table) {
//
});
}
};

@ -0,0 +1,32 @@
<?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('visa_services', function (Blueprint $table) {
$table->string('image')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('visa_services', function (Blueprint $table) {
//
});
}
};

@ -0,0 +1,32 @@
<?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('news_and_updates', function (Blueprint $table) {
$table->string('thumbnail');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('news_and_updates', function (Blueprint $table) {
//
});
}
};

@ -0,0 +1,32 @@
<?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('services', function (Blueprint $table) {
$table->string('banner_image')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('services', function (Blueprint $table) {
//
});
}
};

@ -14,11 +14,8 @@ class DatabaseSeeder extends Seeder
*/ */
public function run() public function run()
{ {
// \App\Models\User::factory(10)->create(); $this->call([
UserTableSeeder::class,
// \App\Models\User::factory()->create([ ]);
// 'name' => 'Test User',
// 'email' => 'test@example.com',
// ]);
} }
} }

@ -0,0 +1,28 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use App\Models\User;
use Illuminate\Support\Facades\Hash;
class UserTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$user = User::create([
'name' => 'Super Admin',
'email' => 'admin@admin.com',
'password' => Hash::make('password'),
// 'is_admin' => true,
// 'is_super_admin' => true,
]);
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save