enquiry-form-submit

et#33
Mahesh Sharma 2 years ago
parent 92b515bd80
commit c5d88c4d03
  1. 45
      app/Http/Controllers/EnquiryController.php
  2. 41
      app/Jobs/SendEnquiryMailJob.php
  3. 65
      app/Mail/EnquiryMail.php
  4. 13
      app/Models/Enquiry.php
  5. 22
      database/migrations/2023_02_16_171148_create_enquiries_table.php
  6. 2
      resources/views/contact.blade.php
  7. 20
      resources/views/enquiry-form.blade.php
  8. 76
      resources/views/enquiry_mail.blade.php
  9. 417
      routes/web.php

@ -0,0 +1,45 @@
<?php
namespace App\Http\Controllers;
use App\Jobs\SendEnquiryMailJob;
use App\Models\Country;
use App\Models\Enquiry;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class EnquiryController extends Controller
{
public function form()
{
$countries = Country::all();
return view('enquiry-form', compact('countries'));
}
public function submit(Request $request)
{
$work_experience = $request->get('work_experience');
if ($work_experience == 'no') {
$request['work_experience_details'] = null;
$request['salary_mode'] = null;
}
$marital_status = $request->get('marital_status');
if ($marital_status == 'Widow' || $marital_status == 'Single') {
$request['married_date'] = null;
$request['spouse_academics'] = null;
$request['spouse_work_experience'] = null;
$request['spouse_salary_mode'] = null;
}
DB::beginTransaction();
try {
$enquiry = Enquiry::create($request->all());
} catch (\Exception $e) {
DB::rollback();
return redirect()->back()->with(['msg' => 'Something went wrong. Please try again!', 'status' => false], 400);
}
DB::commit();
dispatch(new SendEnquiryMailJob($enquiry));
return redirect()->back()->with(['msg' => 'We have recieved your enquiry. You will be contacted soon!', 'status' => true], 200);
}
}

@ -0,0 +1,41 @@
<?php
namespace App\Jobs;
use App\Mail\EnquiryMail;
use App\Models\Setting;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Mail;
class SendEnquiryMailJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Create a new job instance.
*
* @return void
*/
protected $enquiry;
public function __construct($enquiry)
{
$this->enquiry = $enquiry;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
$email = Setting::where('key', 'email')->get('value')->first()->value;
Mail::to($email)->send(new EnquiryMail($this->enquiry));
}
}

@ -0,0 +1,65 @@
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class EnquiryMail extends Mailable
{
use Queueable, SerializesModels;
/**
* Create a new message instance.
*
* @return void
*
*/
protected $enquiry;
public function __construct($enquiry)
{
$this->enquiry = $enquiry;
}
/**
* Get the message envelope.
*
* @return \Illuminate\Mail\Mailables\Envelope
*/
public function envelope()
{
return new Envelope(
subject: 'Enquiry Mail',
);
}
/**
* Get the message content definition.
*
* @return \Illuminate\Mail\Mailables\Content
*/
public function content()
{
return new Content(
view: 'enquiry_mail',
with: [
'enquiry' => $this->enquiry,
],
);
}
/**
* Get the attachments for the message.
*
* @return array
*/
public function attachments()
{
return [];
}
}

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

@ -16,7 +16,7 @@ return new class extends Migration
Schema::create('enquiries', function (Blueprint $table) {
$table->id();
$table->string('first_name');
$table->string('middle_name');
$table->string('middle_name')->nullable();
$table->string('last_name');
$table->date('dob');
$table->string('cob');
@ -25,17 +25,23 @@ return new class extends Migration
$table->string('phone');
$table->string('address');
$table->string('highest_qualification');
$table->string('stream');
$table->string('stream')->nullable();
$table->string('gpa');
$table->string('graduate_year');
$table->string('gap');
$table->string('gap')->nullable();
$table->string('current_status')->nullable();
$table->string('work_experience');
$table->string('salary_mode');
$table->string('test_score');
$table->text('work_experience_details')->nullable();
$table->string('salary_mode')->nullable();
$table->string('test_score')->nullable();
$table->string('marital_status');
$table->string('marital_date');
$table->string('spouse_academics');
$table->string('marital_date');
$table->string('married_date')->nullable();
$table->string('spouse_academics')->nullable();
$table->string('spouse_work_experience')->nullable();
$table->string('spouse_salary_mode')->nullable();
$table->string('immigration_history')->nullable();
$table->string('desired_study_field')->nullable();
$table->string('desired_location')->nullable();
$table->boolean('status')->default(true);
$table->timestamps();
});

@ -9,7 +9,7 @@
<meta property="og:description" content="ET Education and Visa Services, presented by Extratech, is an adept provider of excellent education consultation, information, and visa guidance solution to students seeking schooling abroad."/>
@endsection
@section('content')
@php
@php
$msg = Session::get('msg') ?? null;
@endphp
<section class="abroad-banner-section" style="background: url({{$page->banner_image}})">

@ -10,9 +10,14 @@
@endsection
@section('content')
<section class="enquiry-form-section">
@php
$msg = Session::get('msg') ?? null;
$status = Session::get('status') ?? null;
@endphp
<h2>Enquiry Form</h2>
<p>Please fill up the form and we will get back to you soon, Thanks !</p>
<form action="">
<form action="{{ route('enquiry.submit') }}" method = "post">
@csrf
<div class="row enquiry-form-row">
<h3>Personal Details</h3>
<div class="col-md-4">
@ -241,7 +246,20 @@
</section>
@endsection
@section('script')
<script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script>
var php_var = "<?php echo $msg; ?>";
var status = "<?php echo $status; ?>";
if(php_var.length !== 0){
Swal.fire({
title: 'Submitted!!',
text: php_var,
icon: status ? 'success' : 'error'
})
}
function maritalStatus(){
var marriedDate = document.getElementById('spouse-married-date');
var spouseAcademic = document.getElementById('spouse-academic');

@ -0,0 +1,76 @@
<style>
.main-column{
display:flex;
width:100%;
}
.column-one{
width:50%;
}
</style>
<h1>Persional Details</h1>
<br />
<div class="main-column" style = "display:block; width:100%;">
<div class="column-one" style = "display:block; width:100%;">
<b>Full Name:</b> {{ $enquiry->first_name . ' ' .(!is_null($enquiry->middle_name) ? $enquiry->middle_name .' ' :''). $enquiry->last_name }}<br /><br />
<b>Email:</b> {{ $enquiry->email }}<br /><br />
<b>Phone:</b> {{$enquiry->phone}}<br /><br />
<b>Address:</b> {{$enquiry->address}}<br /><br />
<b>Date of Birth:</b> {{$enquiry->dob}}<br /><br />
<b>Country of Birth:</b> {{$enquiry->cob}}<br /><br />
<b>Gender:</b> {{$enquiry->gender}}<br /><br />
</div>
</div>
<h1>Additional Details</h1>
<br />
<div class="main-column" style = "display:block; width:100%;">
<div class="column-one" style = "display:block; width:100%;">
<b>Highest Qualification:</b> {{ $enquiry->highest_qualification }}<br /><br />
@if(!is_null($enquiry->stream))
<b>Stream:</b> {{$enquiry->stream}}<br /><br />
@endif
<b>% or GPA</b> {{$enquiry->gpa}}<br /><br />
<b>Graduated year:</b> {{$enquiry->graduate_year}}<br /><br />
<b>Gap:</b> {{$enquiry->gap}}<br /><br />
<b>Current Status:</b> {{$enquiry->current_status}}<br /><br />
<b>Work Experience:</b> {{$enquiry->work_experience}}<br /><br />
@if(!is_null($enquiry->work_experience))
<b>Work Experience Details:</b> {{$enquiry->work_experience_details}}<br /><br />
@endif
@if(!is_null($enquiry->salary_mode))
<b>Salary Mode:</b> {{$enquiry->salary_mode}}<br /><br />
@endif
<b>Test Score:</b> {{$enquiry->test_score}}<br /><br />
<b>Marital Status:</b> {{$enquiry->marital_status}}<br /><br />
@if(!is_null($enquiry->married_date))
<b>Married Date:</b> {{$enquiry->married_date}}<br /><br />
@endif
@if(!is_null($enquiry->spouse_academics))
<b>Spouse Academic:</b> {{$enquiry->spouse_academics}}<br /><br />
@endif
@if(!is_null($enquiry->spouse_work_experience))
<b>Spouse Work Experience:</b> {{ $enquiry->spouse_work_experience }}<br /><br />
@endif
@if(!is_null($enquiry->spouse_salary_mode))
<b>Spouse Salary Mode:</b> {{ $enquiry->spouse_salary_mode }}<br /><br />
@endif
@if(!is_null($enquiry->immigration_history))
<b>Immigration History:</b> {{ $enquiry->immigration_history }}<br /><br />
@endif
@if(!is_null($enquiry->desired_study_field))
<b>Desired Field of Study:</b> {{ $enquiry->desired_study_field }}<br /><br />
@endif
@if(!is_null($enquiry->desired_location))
<b>Desired Location:</b> {{ $enquiry->desired_location }}<br /><br />
@endif
</div>
</div>

@ -43,6 +43,7 @@ use App\Models\Country;
use App\Http\Controllers\Admin\TeamController;
use App\Http\Controllers\Admin\AppointmentController;
use App\Http\Controllers\EnquiryController;
/*
|--------------------------------------------------------------------------
@ -54,53 +55,54 @@ use App\Http\Controllers\Admin\AppointmentController;
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/mycron', [HomeController::class,'runQueueJobs']);
Route::get('/seed', [HomeController::class,'runSeeder']);
Route::get('/', [HomeController::class,'index'])->name('home.index');
Route::get('login', [HomeAdminController::class,'getLogin'])->name('login');
Route::post('login', [HomeAdminController::class,'postLogin']);
Route::get('/mycron', [HomeController::class, 'runQueueJobs']);
Route::get('/seed', [HomeController::class, 'runSeeder']);
Route::get('/', [HomeController::class, 'index'])->name('home.index');
Route::get('study-abroad', [StudyAbroadController::class,'study_abroad']);
Route::get('/education/{slug}', [StudyAbroadController::class,'details']);
Route::get('/visa/{slug}', [VisaController::class,'details']);
Route::get('login', [HomeAdminController::class, 'getLogin'])->name('login');
Route::post('login', [HomeAdminController::class, 'postLogin']);
Route::get('study-abroad', [StudyAbroadController::class, 'study_abroad']);
Route::get('/education/{slug}', [StudyAbroadController::class, 'details']);
Route::get('/visa/{slug}', [VisaController::class, 'details']);
// Route::get('/study-abroad-detail', function () {
// return view('study-abroad-detail');
// });
// Route::get('visas', [VisaController::class,'index']);
Route::get('contact', [ContactController::class,'index']);
Route::post('contact', [ContactController::class,'post_contact']);
Route::get('about', [FrontendAboutUsController::class,'index']);
Route::get('appointment', [FrontendAppointmentController::class,'index']);
Route::post('appointments_by_date', [FrontendAppointmentController::class,'get_appointment_by_date']);
Route::post('appointment_submit', [FrontendAppointmentController::class,'form_submit']);
Route::get('contact', [ContactController::class, 'index']);
Route::post('contact', [ContactController::class, 'post_contact']);
Route::get('about', [FrontendAboutUsController::class, 'index']);
Route::get('appointment', [FrontendAppointmentController::class, 'index']);
Route::post('appointments_by_date', [FrontendAppointmentController::class, 'get_appointment_by_date']);
Route::post('appointment_submit', [FrontendAppointmentController::class, 'form_submit']);
// Route::get('/about', function () {
// return view('about');
// });
Route::get('blogs', [BlogController::class,'index']);
Route::get('blog/{slug}', [BlogController::class,'blog_detail']);
Route::get('faqs', [FrontendFaqController::class,'index']);
Route::get('blogs', [BlogController::class, 'index']);
Route::get('blog/{slug}', [BlogController::class, 'blog_detail']);
Route::get('faqs', [FrontendFaqController::class, 'index']);
Route::post('image-upload', [ImageUploadController::class, 'storeImage'])->name('image.upload'); //upload image in CkEditor
Route::post('/subscribe', [HomeController::class, 'subscribe']);
Route::group(['middleware'=>['auth']],function (){
Route::group(['middleware' => ['auth']], function () {
//routes for admin
Route::group(['prefix'=>'admin'],function (){
Route::group(['prefix' => 'admin'], function () {
Route::get('logout', [HomeAdminController::class,'getLogout']);
Route::get('/index', [HomeAdminController::class,'indexAdmin']);
Route::get('logout', [HomeAdminController::class, 'getLogout']);
Route::get('/index', [HomeAdminController::class, 'indexAdmin']);
Route::get('/change_password', [HomeAdminController::class,'change_password']);
Route::post('/change_password', [HomeAdminController::class,'update_password']);
Route::get('/change_password', [HomeAdminController::class, 'change_password']);
Route::post('/change_password', [HomeAdminController::class, 'update_password']);
Route::get('settings',[SettingController::class,'index']);
Route::get('settings/create',[SettingController::class,'create']);
Route::post('settings',[SettingController::class,'store']);
Route::get('settings/{id}',[SettingController::class,'show']);
Route::get('settings/{id}/edit',[SettingController::class,'edit']);
Route::post('settings/{id}',[SettingController::class,'update']);
Route::get('settings/{id}/delete',[SettingController::class,'delete']);
Route::get('settings', [SettingController::class, 'index']);
Route::get('settings/create', [SettingController::class, 'create']);
Route::post('settings', [SettingController::class, 'store']);
Route::get('settings/{id}', [SettingController::class, 'show']);
Route::get('settings/{id}/edit', [SettingController::class, 'edit']);
Route::post('settings/{id}', [SettingController::class, 'update']);
Route::get('settings/{id}/delete', [SettingController::class, 'delete']);
// Route::get('service',[ServiceController::class,'index']);
@ -110,188 +112,184 @@ Route::group(['middleware'=>['auth']],function (){
// Route::post('service/{id}/update',[ServiceController::class,'update']);
// Route::get('service/{id}/delete',[ServiceController::class,'delete']);
Route::get('sliders',[SliderController::class,'index']);
Route::get('sliders/create',[SliderController::class,'create']);
Route::post('sliders',[SliderController::class,'store']);
Route::get('sliders/{id}/view',[SliderController::class,'show']);
Route::get('sliders/{id}/edit',[SliderController::class,'edit']);
Route::post('sliders/{id}',[SliderController::class,'update']);
Route::get('sliders/{id}/delete',[SliderController::class,'destroy']);
Route::resource('about_us',AboutUsController::class);
Route::get('pages',[PageController::class,'index']);
Route::get('pages/create',[PageController::class,'create']);
Route::post('pages',[PageController::class,'store']);
Route::get('pages/{id}/view',[PageController::class,'show']);
Route::get('pages/{id}/edit',[PageController::class,'edit']);
Route::post('pages/{id}',[PageController::class,'update']);
Route::get('pages/{id}/delete',[PageController::class,'destroy']);
Route::get('blogs',[NewsAndUpdateController::class,'index']);
Route::get('blogs/create',[NewsAndUpdateController::class,'create']);
Route::post('blogs',[NewsAndUpdateController::class,'store']);
Route::get('blogs/{id}',[NewsAndUpdateController::class,'show']);
Route::get('blogs/{id}/edit',[NewsAndUpdateController::class,'edit']);
Route::post('blogs/{id}',[NewsAndUpdateController::class,'update']);
Route::get('blogs/delete/{id}',[NewsAndUpdateController::class,'delete']);
Route::get('sliders', [SliderController::class, 'index']);
Route::get('sliders/create', [SliderController::class, 'create']);
Route::post('sliders', [SliderController::class, 'store']);
Route::get('sliders/{id}/view', [SliderController::class, 'show']);
Route::get('sliders/{id}/edit', [SliderController::class, 'edit']);
Route::post('sliders/{id}', [SliderController::class, 'update']);
Route::get('sliders/{id}/delete', [SliderController::class, 'destroy']);
Route::resource('about_us', AboutUsController::class);
Route::get('pages', [PageController::class, 'index']);
Route::get('pages/create', [PageController::class, 'create']);
Route::post('pages', [PageController::class, 'store']);
Route::get('pages/{id}/view', [PageController::class, 'show']);
Route::get('pages/{id}/edit', [PageController::class, 'edit']);
Route::post('pages/{id}', [PageController::class, 'update']);
Route::get('pages/{id}/delete', [PageController::class, 'destroy']);
Route::get('blogs', [NewsAndUpdateController::class, 'index']);
Route::get('blogs/create', [NewsAndUpdateController::class, 'create']);
Route::post('blogs', [NewsAndUpdateController::class, 'store']);
Route::get('blogs/{id}', [NewsAndUpdateController::class, 'show']);
Route::get('blogs/{id}/edit', [NewsAndUpdateController::class, 'edit']);
Route::post('blogs/{id}', [NewsAndUpdateController::class, 'update']);
Route::get('blogs/delete/{id}', [NewsAndUpdateController::class, 'delete']);
// Route::get('blog_point/{blog_point_id}',[BlogController::class,'blog_point']);
Route::get('galleries',[GalleryController::class,'index']);
Route::get('galleries/create',[GalleryController::class,'create']);
Route::post('galleries',[GalleryController::class,'store']);
Route::get('galleries/{id}',[GalleryController::class,'show']);
Route::get('galleries/{id}/edit',[GalleryController::class,'edit']);
Route::post('galleries/{id}',[GalleryController::class,'update']);
Route::get('galleries/delete/{id}',[GalleryController::class,'delete']);
Route::get('referrals',[ReferralAdminController::class,'index']);
Route::get('referrals/create',[ReferralAdminController::class,'create']);
Route::post('referrals/store',[ReferralAdminController::class,'store']);
Route::get('referrals/{id}/view',[ReferralAdminController::class,'show']);
Route::post('referrals/{id}/update',[ReferralAdminController::class,'update']);
Route::get('referrals/{id}/delete',[ReferralAdminController::class,'delete']);
Route::get('ndis_pricing',[NdisPricingController::class,'index']);
Route::get('ndis_pricing/create',[NdisPricingController::class,'create']);
Route::post('ndis_pricing',[NdisPricingController::class,'store']);
Route::get('ndis_pricing/{id}/view',[NdisPricingController::class,'show']);
Route::get('ndis_pricing/{id}/edit',[NdisPricingController::class,'edit']);
Route::post('ndis_pricing/{id}',[NdisPricingController::class,'update']);
Route::get('ndis_pricing/{id}/delete',[NdisPricingController::class,'destroy']);
Route::get('sub_offices',[SubOfficeController::class,'index']);
Route::get('sub_offices/create',[SubOfficeController::class,'create']);
Route::post('sub_offices',[SubOfficeController::class,'store']);
Route::get('sub_offices/{id}/edit',[SubOfficeController::class,'edit']);
Route::post('sub_offices/{id}',[SubOfficeController::class,'update']);
Route::get('sub_offices_delete/{id}',[SubOfficeController::class,'delete']);
Route::get('departments',[DepartmentController::class,'index']);
Route::get('departments/create',[DepartmentController::class,'create']);
Route::post('departments/store',[DepartmentController::class,'store']);
Route::get('departments/{id}/edit',[DepartmentController::class,'edit']);
Route::post('departments/{id}',[DepartmentController::class,'update']);
Route::get('departments/{id}/delete',[DepartmentController::class,'delete']);
Route::get('services',[ServiceController::class,'index']);
Route::get('services/create',[ServiceController::class,'create']);
Route::post('service',[ServiceController::class,'store']);
Route::get('services/{id}/edit',[ServiceController::class,'edit']);
Route::get('services/{id}/view',[ServiceController::class,'show']);
Route::post('services/{id}',[ServiceController::class,'update']);
Route::get('services/{id}/delete',[ServiceController::class,'delete']);
Route::get('galleries', [GalleryController::class, 'index']);
Route::get('galleries/create', [GalleryController::class, 'create']);
Route::post('galleries', [GalleryController::class, 'store']);
Route::get('galleries/{id}', [GalleryController::class, 'show']);
Route::get('galleries/{id}/edit', [GalleryController::class, 'edit']);
Route::post('galleries/{id}', [GalleryController::class, 'update']);
Route::get('galleries/delete/{id}', [GalleryController::class, 'delete']);
Route::get('referrals', [ReferralAdminController::class, 'index']);
Route::get('referrals/create', [ReferralAdminController::class, 'create']);
Route::post('referrals/store', [ReferralAdminController::class, 'store']);
Route::get('referrals/{id}/view', [ReferralAdminController::class, 'show']);
Route::post('referrals/{id}/update', [ReferralAdminController::class, 'update']);
Route::get('referrals/{id}/delete', [ReferralAdminController::class, 'delete']);
Route::get('ndis_pricing', [NdisPricingController::class, 'index']);
Route::get('ndis_pricing/create', [NdisPricingController::class, 'create']);
Route::post('ndis_pricing', [NdisPricingController::class, 'store']);
Route::get('ndis_pricing/{id}/view', [NdisPricingController::class, 'show']);
Route::get('ndis_pricing/{id}/edit', [NdisPricingController::class, 'edit']);
Route::post('ndis_pricing/{id}', [NdisPricingController::class, 'update']);
Route::get('ndis_pricing/{id}/delete', [NdisPricingController::class, 'destroy']);
Route::get('sub_offices', [SubOfficeController::class, 'index']);
Route::get('sub_offices/create', [SubOfficeController::class, 'create']);
Route::post('sub_offices', [SubOfficeController::class, 'store']);
Route::get('sub_offices/{id}/edit', [SubOfficeController::class, 'edit']);
Route::post('sub_offices/{id}', [SubOfficeController::class, 'update']);
Route::get('sub_offices_delete/{id}', [SubOfficeController::class, 'delete']);
Route::get('departments', [DepartmentController::class, 'index']);
Route::get('departments/create', [DepartmentController::class, 'create']);
Route::post('departments/store', [DepartmentController::class, 'store']);
Route::get('departments/{id}/edit', [DepartmentController::class, 'edit']);
Route::post('departments/{id}', [DepartmentController::class, 'update']);
Route::get('departments/{id}/delete', [DepartmentController::class, 'delete']);
Route::get('services', [ServiceController::class, 'index']);
Route::get('services/create', [ServiceController::class, 'create']);
Route::post('service', [ServiceController::class, 'store']);
Route::get('services/{id}/edit', [ServiceController::class, 'edit']);
Route::get('services/{id}/view', [ServiceController::class, 'show']);
Route::post('services/{id}', [ServiceController::class, 'update']);
Route::get('services/{id}/delete', [ServiceController::class, 'delete']);
// Route::get('service_point/{service_point_id}',[ServiceController::class,'service_point']);
Route::get('services/{id}/sections',[ServiceSectionController::class,'index']);
Route::get('services/{id}/section/create',[ServiceSectionController::class,'create']);
Route::post('service/{id}/section',[ServiceSectionController::class,'store']);
Route::get('services/{id}/section/{secId}/edit',[ServiceSectionController::class,'edit']);
Route::get('services/{id}/section/{secId}/view',[ServiceSectionController::class,'show']);
Route::post('services/{id}/section/{secId}',[ServiceSectionController::class,'update']);
Route::get('services/{id}/section/delete',[ServiceSectionController::class,'delete']);
Route::get('service_point/{service_point_id}',[ServiceSectionController::class,'service_point']);
Route::get('visa_services',[VisaServiceController::class,'index']);
Route::get('visa_services/create',[VisaServiceController::class,'create']);
Route::post('visa_service',[VisaServiceController::class,'store']);
Route::get('visa_services/{id}/edit',[VisaServiceController::class,'edit']);
Route::get('visa_services/{id}/view',[VisaServiceController::class,'show']);
Route::post('visa_services/{id}',[VisaServiceController::class,'update']);
Route::get('visa_services/{id}/delete',[VisaServiceController::class,'delete']);
Route::get('services/{id}/sections', [ServiceSectionController::class, 'index']);
Route::get('services/{id}/section/create', [ServiceSectionController::class, 'create']);
Route::post('service/{id}/section', [ServiceSectionController::class, 'store']);
Route::get('services/{id}/section/{secId}/edit', [ServiceSectionController::class, 'edit']);
Route::get('services/{id}/section/{secId}/view', [ServiceSectionController::class, 'show']);
Route::post('services/{id}/section/{secId}', [ServiceSectionController::class, 'update']);
Route::get('services/{id}/section/delete', [ServiceSectionController::class, 'delete']);
Route::get('service_point/{service_point_id}', [ServiceSectionController::class, 'service_point']);
Route::get('visa_services', [VisaServiceController::class, 'index']);
Route::get('visa_services/create', [VisaServiceController::class, 'create']);
Route::post('visa_service', [VisaServiceController::class, 'store']);
Route::get('visa_services/{id}/edit', [VisaServiceController::class, 'edit']);
Route::get('visa_services/{id}/view', [VisaServiceController::class, 'show']);
Route::post('visa_services/{id}', [VisaServiceController::class, 'update']);
Route::get('visa_services/{id}/delete', [VisaServiceController::class, 'delete']);
// Route::get('service_section_point/{service_point_id}',[VisaServiceController::class,'service_point']);
Route::get('visa_services/{id}/sections',[VisaServiceSectionController::class,'index']);
Route::get('visa_services/{id}/section/create',[VisaServiceSectionController::class,'create']);
Route::post('visa_service/{id}/section',[VisaServiceSectionController::class,'store']);
Route::get('visa_services/{id}/section/{secId}/edit',[VisaServiceSectionController::class,'edit']);
Route::get('visa_services/{id}/section/{secId}/view',[VisaServiceSectionController::class,'show']);
Route::post('visa_services/{id}/section/{secId}',[VisaServiceSectionController::class,'update']);
Route::get('visa_services/{id}/section/delete',[VisaServiceSectionController::class,'delete']);
Route::get('visa_services/{id}/sections', [VisaServiceSectionController::class, 'index']);
Route::get('visa_services/{id}/section/create', [VisaServiceSectionController::class, 'create']);
Route::post('visa_service/{id}/section', [VisaServiceSectionController::class, 'store']);
Route::get('visa_services/{id}/section/{secId}/edit', [VisaServiceSectionController::class, 'edit']);
Route::get('visa_services/{id}/section/{secId}/view', [VisaServiceSectionController::class, 'show']);
Route::post('visa_services/{id}/section/{secId}', [VisaServiceSectionController::class, 'update']);
Route::get('visa_services/{id}/section/delete', [VisaServiceSectionController::class, 'delete']);
// Route::get('service_point/{service_point_id}',[VisaServiceSectionController::class,'service_point']);
Route::get('testimonials',[TestimonialController::class,'index']);
Route::get('testimonials/create',[TestimonialController::class,'create']);
Route::post('testimonials',[TestimonialController::class,'store']);
Route::get('testimonials/{id}/edit',[TestimonialController::class,'edit']);
Route::post('testimonials/{id}',[TestimonialController::class,'update']);
Route::get('testimonials/{id}',[TestimonialController::class,'show']);
Route::get('testimonials/{id}/delete',[TestimonialController::class,'delete']);
Route::get('clients',[ClientController::class,'index']);
Route::get('clients/create',[ClientController::class,'create']);
Route::post('clients',[ClientController::class,'store']);
Route::get('clients/{id}/edit',[ClientController::class,'edit']);
Route::post('clients/{id}',[ClientController::class,'update']);
Route::get('faqs',[FaqController::class,'index']);
Route::get('faqs/create',[FaqController::class,'create']);
Route::post('faqs',[FaqController::class,'store']);
Route::get('faqs/{id}/edit',[FaqController::class,'edit']);
Route::post('faqs/{id}',[FaqController::class,'update']);
Route::get('faqs/{id}',[FaqController::class,'show']);
Route::get('add-sections',[AddSectionController::class,'index']);
Route::get('add-sections/create',[AddSectionController::class,'create']);
Route::post('add-sections',[AddSectionController::class,'store']);
Route::get('add-sections/{id}/edit',[AddSectionController::class,'edit']);
Route::post('add-sections/{id}',[AddSectionController::class,'update']);
Route::get('add-sections/{id}/delete',[AddSectionController::class,'delete']);
Route::get('seo_titles',[SeoTitleController::class,'index']);
Route::get('seo_titles/create',[SeoTitleController::class,'create']);
Route::post('seo_titles',[SeoTitleController::class,'store']);
Route::get('seo_titles/{id}/edit',[SeoTitleController::class,'edit']);
Route::post('seo_titles/{id}',[SeoTitleController::class,'update']);
Route::get('seo_titles_delete/{id}',[SeoTitleController::class,'delete']);
Route::get('contacts',[ContactUsController::class,'index']);
Route::get('contacts/{id}/view',[ContactUsController::class,'show']);
Route::get('enrollments',[EnrollmentController::class,'index']);
Route::get('enrollments/{id}/view',[EnrollmentController::class,'show']);
Route::get('teams',[TeamController::class,'index']);
Route::get('teams/create',[TeamController::class,'create']);
Route::post('teams',[TeamController::class,'store']);
Route::get('teams/{id}/edit',[TeamController::class,'edit']);
Route::post('teams/{id}',[TeamController::class,'update']);
Route::get('careers',[CareerController::class,'index']);
Route::get('careers/create',[CareerController::class,'create']);
Route::post('careers',[CareerController::class,'store']);
Route::get('careers/{id}/edit',[CareerController::class,'edit']);
Route::post('careers/{id}',[CareerController::class,'update']);
Route::get('careers/{id}',[CareerController::class,'show']);
Route::get('appointments',[AppointmentController::class,'index']);
Route::get('appointments/create',[AppointmentController::class,'create']);
Route::post('appointments',[AppointmentController::class,'store']);
Route::get('appointments/{id}/edit',[AppointmentController::class,'edit']);
Route::post('appointments/{id}',[AppointmentController::class,'update']);
Route::get('appointments/{id}/view',[AppointmentController::class,'show']);
Route::get('appointments/{id}/delete',[AppointmentController::class,'destroy']);
Route::get('accomodations',[AccomodationController::class,'index']);
Route::get('accomodations/create',[AccomodationController::class,'create']);
Route::post('accomodations',[AccomodationController::class,'store']);
Route::get('accomodations/{id}/edit',[AccomodationController::class,'edit']);
Route::post('accomodations/{id}',[AccomodationController::class,'update']);
Route::get('accomodations/{id}',[AccomodationController::class,'show']);
Route::get('accomodations/{id}/delete',[AccomodationController::class,'delete']);
Route::get('accomodations/points_remove/{id}',[AccomodationController::class,'points_remove']);
Route::get('accomodations/information_points_remove/{id}',[AccomodationController::class,'information_points_remove']);
Route::get('accomodations/slider_points_remove/{id}',[AccomodationController::class,'slider_points_remove']);
Route::get('testimonials', [TestimonialController::class, 'index']);
Route::get('testimonials/create', [TestimonialController::class, 'create']);
Route::post('testimonials', [TestimonialController::class, 'store']);
Route::get('testimonials/{id}/edit', [TestimonialController::class, 'edit']);
Route::post('testimonials/{id}', [TestimonialController::class, 'update']);
Route::get('testimonials/{id}', [TestimonialController::class, 'show']);
Route::get('testimonials/{id}/delete', [TestimonialController::class, 'delete']);
Route::get('clients', [ClientController::class, 'index']);
Route::get('clients/create', [ClientController::class, 'create']);
Route::post('clients', [ClientController::class, 'store']);
Route::get('clients/{id}/edit', [ClientController::class, 'edit']);
Route::post('clients/{id}', [ClientController::class, 'update']);
Route::get('faqs', [FaqController::class, 'index']);
Route::get('faqs/create', [FaqController::class, 'create']);
Route::post('faqs', [FaqController::class, 'store']);
Route::get('faqs/{id}/edit', [FaqController::class, 'edit']);
Route::post('faqs/{id}', [FaqController::class, 'update']);
Route::get('faqs/{id}', [FaqController::class, 'show']);
Route::get('add-sections', [AddSectionController::class, 'index']);
Route::get('add-sections/create', [AddSectionController::class, 'create']);
Route::post('add-sections', [AddSectionController::class, 'store']);
Route::get('add-sections/{id}/edit', [AddSectionController::class, 'edit']);
Route::post('add-sections/{id}', [AddSectionController::class, 'update']);
Route::get('add-sections/{id}/delete', [AddSectionController::class, 'delete']);
Route::get('seo_titles', [SeoTitleController::class, 'index']);
Route::get('seo_titles/create', [SeoTitleController::class, 'create']);
Route::post('seo_titles', [SeoTitleController::class, 'store']);
Route::get('seo_titles/{id}/edit', [SeoTitleController::class, 'edit']);
Route::post('seo_titles/{id}', [SeoTitleController::class, 'update']);
Route::get('seo_titles_delete/{id}', [SeoTitleController::class, 'delete']);
Route::get('contacts', [ContactUsController::class, 'index']);
Route::get('contacts/{id}/view', [ContactUsController::class, 'show']);
Route::get('enrollments', [EnrollmentController::class, 'index']);
Route::get('enrollments/{id}/view', [EnrollmentController::class, 'show']);
Route::get('teams', [TeamController::class, 'index']);
Route::get('teams/create', [TeamController::class, 'create']);
Route::post('teams', [TeamController::class, 'store']);
Route::get('teams/{id}/edit', [TeamController::class, 'edit']);
Route::post('teams/{id}', [TeamController::class, 'update']);
Route::get('careers', [CareerController::class, 'index']);
Route::get('careers/create', [CareerController::class, 'create']);
Route::post('careers', [CareerController::class, 'store']);
Route::get('careers/{id}/edit', [CareerController::class, 'edit']);
Route::post('careers/{id}', [CareerController::class, 'update']);
Route::get('careers/{id}', [CareerController::class, 'show']);
Route::get('appointments', [AppointmentController::class, 'index']);
Route::get('appointments/create', [AppointmentController::class, 'create']);
Route::post('appointments', [AppointmentController::class, 'store']);
Route::get('appointments/{id}/edit', [AppointmentController::class, 'edit']);
Route::post('appointments/{id}', [AppointmentController::class, 'update']);
Route::get('appointments/{id}/view', [AppointmentController::class, 'show']);
Route::get('appointments/{id}/delete', [AppointmentController::class, 'destroy']);
Route::get('accomodations', [AccomodationController::class, 'index']);
Route::get('accomodations/create', [AccomodationController::class, 'create']);
Route::post('accomodations', [AccomodationController::class, 'store']);
Route::get('accomodations/{id}/edit', [AccomodationController::class, 'edit']);
Route::post('accomodations/{id}', [AccomodationController::class, 'update']);
Route::get('accomodations/{id}', [AccomodationController::class, 'show']);
Route::get('accomodations/{id}/delete', [AccomodationController::class, 'delete']);
Route::get('accomodations/points_remove/{id}', [AccomodationController::class, 'points_remove']);
Route::get('accomodations/information_points_remove/{id}', [AccomodationController::class, 'information_points_remove']);
Route::get('accomodations/slider_points_remove/{id}', [AccomodationController::class, 'slider_points_remove']);
});
});
Route::get('/services', function () {
return view('services');
@ -302,12 +300,13 @@ Route::get('/career_counselling', function () {
Route::get('/insurance', function () {
return view('insurance');
});
Route::get('/enquiry', function () {
$countries = Country::all();
return view('enquiry-form', compact('countries'));
});
// Route::get('/enquiry', function () {
// $countries = Country::all();
// return view('enquiry-form', compact('countries'));
// });
Route::get('/enquiry' , [EnquiryController::class, 'form']);
Route::post('/enquiry' , [EnquiryController::class, 'submit'])->name('enquiry.submit');
// Route::get('/visa', function () {
// return view('visa');
// });

Loading…
Cancel
Save