Refactor course finder and resources templates for improved readability and functionality

- Updated course finder form to use HTML helper methods for cleaner syntax.
- Enhanced form structure with better class management and attributes.
- Implemented AJAX pagination for course listings to improve user experience.
- Cleaned up resource template code for consistency and readability.
- Ensured proper indentation and spacing for better maintainability.
- Added missing target="_blank" attribute for external links in resource documents.
This commit is contained in:
2025-08-03 18:01:22 +05:45
parent 5e4cb2767c
commit afc7c61f86
5 changed files with 582 additions and 450 deletions

View File

@@ -93,7 +93,6 @@ class ProgramController extends Controller
$program->tests()->sync($attachData); $program->tests()->sync($attachData);
flash()->success('Program has been created!'); flash()->success('Program has been created!');
}); });
return redirect()->route('program.index'); return redirect()->route('program.index');
@@ -148,7 +147,6 @@ class ProgramController extends Controller
} }
$program->tests()->sync($attachData); $program->tests()->sync($attachData);
}); });
flash()->success('program has been updated!'); flash()->success('program has been updated!');
@@ -166,12 +164,10 @@ class ProgramController extends Controller
$program->delete(); $program->delete();
flash()->success('Program has been deleted!'); flash()->success('Program has been deleted!');
} catch (\Throwable $th) { } catch (\Throwable $th) {
flash()->error($th->getMessage()); flash()->error($th->getMessage());
} }
return response()->json(['status' => 200, 'message' => 'Program has been deleted!'], 200); return response()->json(['status' => 200, 'message' => 'Program has been deleted!'], 200);
} }
public function getProgramByInstitution(Request $request) public function getProgramByInstitution(Request $request)
@@ -190,7 +186,6 @@ class ProgramController extends Controller
'status' => false, 'status' => false,
'msg' => $th->getMessage(), 'msg' => $th->getMessage(),
], 500); ], 500);
} }
} }
@@ -206,4 +201,62 @@ class ProgramController extends Controller
return redirect()->back()->with('error', $th->getMessage()); return redirect()->back()->with('error', $th->getMessage());
} }
} }
public function getCoursesList(Request $request)
{
$data['intakes'] = Program::INTAKE;
$query = Program::query();
if ($request->filled('countries_id')) {
$query->whereRelation('institution', 'countries_id', $request->countries_id);
}
if ($request->filled('institution_id')) {
$query->where('institutions_id', $request->institution_id);
}
if ($request->filled('search')) {
$query->where(function ($q) use ($request) {
$q->where('keywords', 'like', "%{$request->search}%")
->orWhere('title', 'like', "%{$request->search}%");
});
}
if ($request->filled('programlevels_id')) {
$query->where('programlevels_id', $request->programlevels_id);
}
if ($request->filled('intake_id')) {
$query->whereJsonContains('intakes', $request->intake_id);
}
if ($request->filled('preffered_location')) {
$query->where('location', 'like', "%{$request->preffered_location}%");
}
if ($request->filled('service_id')) {
$query->whereRelation('services', 'service_id', '=', $request->service_id);
if ($request->filled('min_score')) {
$query->whereRelation('services', 'min_score', '<=', $request->min_score);
}
if ($request->filled('max_score')) {
$query->whereRelation('services', 'band_score', '<=', $request->max_score);
}
}
$data['courses'] = $query
->orderBy('title', 'asc')
->paginate(10)
->withQueryString();
$queryCount = $data['courses']->total();
if ($request->ajax()) {
$view = view('client.raffles.pages.course.list', $data)->render();
return response()->json(['html' => $view, 'queryCount' => $queryCount]);
}
}
} }

View File

@@ -188,45 +188,46 @@
</div> </div>
<div id="myModal" class="modal fade" tabindex="-1" aria-labelledby="myModalLabel" aria-hidden="false" <div id="myModal" class="modal fade" tabindex="-1" aria-labelledby="myModalLabel" aria-hidden="false"
style="display: none;"> style="display: none;">
<div class="modal-dialog modal-lg"> <div class="modal-dialog modal-lg">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title" id="myModalLabel">Program Import</h5> <h5 class="modal-title" id="myModalLabel">Program Import</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"> </button> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"> </button>
</div>
<div class="modal-body">
<div class="row">
<div class="col-lg-6">
<form action="{{ route('program.import') }}" method="post" enctype="multipart/form-data">
@csrf
<div class="form-group">
<div class="form-control-wrap mb-1">
<input class="form-control" id="formFileLg" type="file" name="file"
accept=".xlsx, .xls, .csv" required>
</div>
</div> </div>
<button type="submit" class="btn btn-primary btn-md float-right mt-3">Upload</button> <div class="modal-body">
</form> <div class="row">
</div> <div class="col-lg-6">
<div class="col-lg-6"> <form action="{{ route('program.import') }}" method="post" enctype="multipart/form-data">
<div class="card text-center"> @csrf
<div class="card-body"> <div class="form-group">
<h5 class="card-title">Sample Sheet</h5> <div class="form-control-wrap mb-1">
<p class="card-text text-danger">Note: Do not change sheet header. <input class="form-control" id="formFileLg" type="file" name="file"
</p> accept=".xlsx, .xls, .csv" required>
<a href="{{ asset('samples/CourseSample.xlsx') }}" class="btn btn-secondary btn-md">Download </div>
Sample</a> </div>
</div> <button type="submit" class="btn btn-primary btn-md float-right mt-3">Upload</button>
</div> </form>
</div> </div>
<div class="col-lg-6">
<div class="card text-center">
<div class="card-body">
<h5 class="card-title">Sample Sheet</h5>
<p class="card-text text-danger">Note: Do not change sheet header.
</p>
<a href="{{ asset('samples/CourseSample.xlsx') }}"
class="btn btn-secondary btn-md">Download
Sample</a>
</div>
</div>
</div>
</div> </div>
</div><!-- /.modal-content --> </div><!-- /.modal-content -->
</div><!-- /.modal-dialog --> </div><!-- /.modal-dialog -->
</div><!-- /.modal --> </div><!-- /.modal -->
</div> </div>
@endsection @endsection
@push('js') @push('js')
<script> <script>

View File

@@ -0,0 +1,82 @@
@if (isset($courses))
{{ $courses->links() }}
@forelse ($programs as $item)
<div class="course-finder-box">
<div class="row">
<div class="col col-md-2">
<div class="sm:w-50percent w-full h-70">
<img class="w-full h-full" src="{{ $item->institution?->image }}" alt="">
</div>
</div>
<div class="col col-md-7">
<div class="flex flex-col gap-5">
<h3 class="text-20 font-medium">{{ $item->title }}</h3>
<h5 class="text-16 font-lighter">{{ $item->institution?->title }} <span
class="text-brand">{{ $item->institution?->country?->title }}</span>
</h5>
<div class="flex gap-10 items-center">
<h6 class="text-grey font-medium text-14"><span class="font-bold">Code:</span>
{{ !empty($item->code) ? $item->code : 'N/A' }}</h6>
<h6 class="text-grey font-medium text-14"><span class="font-bold">Fee:</span>
{{ !empty($item->fee) ? $item->fee : 'N/A' }}</h6>
<h6 class="text-grey font-medium text-14"><span class="font-bold">Schlorship:</span>
{{ !empty($item->scholarship) ? $item->scholarship : 'N/A' }}</h6>
</div>
<div class="flex gap-10 items-center">
<h6 class="text-grey font-medium text-14"><span class="font-bold">Level:</span>
{{ !empty($item->programlevel?->title) ? $item->programlevel?->title : 'N/A' }}
</h6>
<h6 class="text-grey font-medium text-14"><span class="font-bold">Duration:</span>
{{ !empty($item->year) ? $item->year : 'N/A' }}</h6>
</h6>
<h6 class="text-grey font-medium text-14"><span class="font-bold">PSW:</span>
{{ !empty($item->psw) ? $item->psw : 'N/A' }}</h6>
</h6>
</div>
</div>
</div>
<div class="col col-md-3">
<div class="flex flex-col gap-10 ">
@foreach ($item->tests as $index => $test)
<h6 class="text-black text-16 font-medium"><span
class="font-bold">{{ $test->title }}:</span>
{{ $test->pivot?->min_score }}
({{ $test->pivot?->band_score }})
</h6>
@endforeach
</div>
</div>
</div>
<div class="row">
<div class="col col-12">
<div class="flex items-center gap-10">
@if (!empty($item->intakes))
<h6 class="text-16">Intake:</h6>
@forelse ($item->intakes as $value)
<h6 class="bg-sec text-14 text-white px-5 py-5 rounded-10 font-bold">
{{ $intakeOptions[$value] }}</h6>
</h6>
@empty
<span class="fs-13 text-muted mb-0 text-center"><span
class="badge bg-danger p-2">N/A</span></span>
@endforelse
@endif
</div>
</div>
</div>
</div>
@empty
<div class="text-center">
<p class="text-danger">No Course Found !!!</p>
</div>
@endforelse
{{ $programs->links() }}
@endif

View File

@@ -12,311 +12,301 @@
deciding where and what to study abroad can be a daunting task. Don't worry, we are here to guide you during deciding where and what to study abroad can be a daunting task. Don't worry, we are here to guide you during
the entire process.</p> the entire process.</p>
</div> </div>
<form id="filterForm" method="GET">
{{ html()->form('GET')->route('program.index')->class(['filter-form', 'filterForm'])->attributes(['id' => 'filter-form'])->open() }}
<div class="row">
<div class=" col col-md-9 ">
<div class=" course-finder-top">
<h2 class="text-black text-center text-24 py-10">Browse Subjects</h2>
{{ html()->text('search')->value(request('search'))->placeholder('Search Program')->class('form-control px-10 py-10')->style('width: 95%;') }}
<button type="submit" class="bg-transparent border-0"><i
class="lqd-icn-ess icon-ld-search-2 text-24 font-bold"></i></button>
</div>
</div>
</div>
<div class="py-20 ">
<div class="row"> <div class="row">
<div class=" col col-md-9 "> <div class="col col-md-9">
<div class=" course-finder-top"> <div class="course-finder-form">
<h2 class="text-black text-center text-24 py-10">Browse Subjects</h2> <h2 class="text-22 text-center text-sec font-bold">Browse Through Category</h2>
<input class="w-full px-10 py-10" type="text" name="" id="" <div class="row">
value="{{ request('search') }}" placeholder="Search Your Favourite Subjects" autocomplete="off"> <div class="col col-sm-6 col-md-4">
<button type="submit" class="bg-transparent border-0"><i {{ html()->select('country_id', $countryOptions)->value(request('country_id'))->placeholder('Select Country')->class('form-select choices-select countryDropdown w-full py-10 px-5 text-14') }}
class="lqd-icn-ess icon-ld-search-2 text-24 font-bold"></i></button> </div>
<div class="col col-sm-6 col-md-4">
{{ html()->select('institution_id', $institutionOptions)->value(request('institution_id'))->placeholder('Select Institution')->class('form-select institutionDropdown w-full py-10 px-5 text-14') }}
</div>
<div class="col col-sm-6 col-md-4">
{{ html()->select('programlevel_id', $programLevelOptions)->value(request('programlevel_id'))->placeholder('Select Program Level')->class('form-select choices-select w-full py-10 px-5 text-14') }}
</div>
<div class="col col-sm-6 col-md-4">
{{ html()->select('intake_id', $intakeOptions)->value(request('intake_id'))->placeholder('Select Intake')->class('form-select choices-select w-full py-10 px-5 text-14') }}
</div>
@php
$statusList = config('constants.page_status_options');
$hasClass = false;
$hasStatus = false;
if (request()->has('class_id')) {
$hasClass = true;
}
if (request()->has('status')) {
$hasStatus = true;
}
@endphp
<div class="col col-sm-6 col-md-4">
{{ html()->select('test_id', $testOptions)->value(request('test_id'))->placeholder('Test Proficiency')->class('form-select choices-select w-full py-10 px-5 text-14') }}
</div>
<div class="col col-sm-6 col-md-4">
<div class="flex gap-10 items-center flex-wrp">
<input class="text-14 px-5 py-10 w-50percent" type="text" name="min_score"
placeholder="Min score" value="{{ request('min_score') }}">
<input class="text-14 px-5 py-10 w-50percent" type="text" placeholder="Max Score"
value="{{ request('max_score') }}">
</div>
</div>
<div class="col col-sm-12">
<div class="flex gap-20 justify-center items-center">
<button type="submit"
class="text-14 px-20 py-10 rounded-10 bg-sec text-white border-0">Submit</button>
<a href="javascript:void(0)" onclick="resetForm()"><button
class="text-14 px-20 py-10 rounded-10 bg-brand text-white border-0">Reset</button></a>
</div>
</div>
</div>
</div> </div>
</div>
</div> {{ html()->form()->close() }}
<div class="py-20 "> <div class="data-wrapper py-20">
<div class="row"> <h2 class="text-22 text-center text-sec font-bold">Available Courses</h2>
<div class="col col-md-9"> @forelse ($programs as $item)
<div class="course-finder-form"> <div class="course-finder-box">
<h2 class="text-22 text-center text-sec font-bold">Browse Through Category</h2> <div class="row">
<div class="row"> <div class="col col-md-2">
<div class="col col-sm-6 col-md-4"> <div class="sm:w-50percent w-full h-70">
<select class="w-full py-10 px-5 text-14" name="country_id" <img class="w-full h-full" src="{{ $item->institution?->image }}"
value="{{ request('country_id') }}"> alt="">
<option value="" selected hidden>Choose Country</option> </div>
@foreach ($countryOptions as $key => $value) </div>
<option value="{{ $key }}" @selected(request('country_id') == $key)>
{{ $value }}</option>
@endforeach
</select>
</div>
<div class="col col-sm-6 col-md-4"> <div class="col col-md-7">
<select class=" w-full py-10 px-5 text-14" name="" id="institutionDropdown" <div class="flex flex-col gap-5">
name="institution_id"> <h3 class="text-20 font-medium">{{ $item->title }}</h3>
<option value="" selected>Choose Institution</option> <h5 class="text-16 font-lighter">{{ $item->institution?->title }} <span
@foreach ($institutionOptions as $key => $Institution) class="text-brand">{{ $item->institution?->country?->title }}</span>
<option value="{{ $key }}" @selected(request('institution_id') == $key)> </h5>
{{ $Institution }}</option> <div class="flex gap-10 items-center">
@endforeach <h6 class="text-grey font-medium text-14"><span
</select> class="font-bold">Code:</span>
</div> {{ !empty($item->code) ? $item->code : 'N/A' }}</h6>
<h6 class="text-grey font-medium text-14"><span
class="font-bold">Fee:</span>
{{ !empty($item->fee) ? $item->fee : 'N/A' }}</h6>
<h6 class="text-grey font-medium text-14"><span
class="font-bold">Schlorship:</span>
{{ !empty($item->scholarship) ? $item->scholarship : 'N/A' }}</h6>
</div>
<div class="col col-sm-6 col-md-4"> <div class="flex gap-10 items-center">
<select class=" w-full py-10 px-5 text-14" name="programlevel_id" <h6 class="text-grey font-medium text-14"><span
value="{{ request('institution_id') }}"> class="font-bold">Level:</span>
<option value="" selected hidden>Choose Level</option> {{ !empty($item->programlevel?->title) ? $item->programlevel?->title : 'N/A' }}
@foreach ($programLevelOptions as $key => $Level) </h6>
<option value="{{ $key }}" @selected(request('programlevel_id') == $key)> <h6 class="text-grey font-medium text-14"><span
{{ $Level }}</option> class="font-bold">Duration:</span>
@endforeach {{ !empty($item->year) ? $item->year : 'N/A' }}</h6>
</select> </h6>
</div> <h6 class="text-grey font-medium text-14"><span
class="font-bold">PSW:</span>
{{ !empty($item->psw) ? $item->psw : 'N/A' }}</h6>
</h6>
</div>
<div class="col col-sm-6 col-md-4"> </div>
<select class=" w-full py-10 px-5 text-14" name="intake_id"
value="{{ request('intake_id') }}">
<option value="" selected hidden>Choose Intake</option>
@foreach ($intakeOptions as $key => $Intake)
<option value="{{ $key }}" @selected(request('intake_id') == $key)>
{{ $Intake }}</option>
@endforeach
</select>
</div>
<div class="col col-sm-6 col-md-4"> </div>
<select class=" w-full py-10 px-5 text-14" name="test_id" <div class="col col-md-3">
value="{{ request('test_id') }}"> <div class="flex flex-col gap-10 ">
<option value="" selected hidden>Choose Class</option> @foreach ($item->tests as $index => $test)
@foreach ($testOptions as $key => $Test) <h6 class="text-black text-16 font-medium"><span
<option value="{{ $key }}" @selected(request('test_id') == $key)> class="font-bold">{{ $test->title }}:</span>
{{ $Test }}</option> {{ $test->pivot?->min_score }}
@endforeach ({{ $test->pivot?->band_score }})
</select> </h6>
</div> @endforeach
</div>
<div class="col col-sm-6 col-md-4">
<div class="flex gap-10 items-center flex-wrp">
<input class="text-14 px-5 py-10 w-50percent" type="text" name="min_score"
placeholder="Min score" value="{{ request('min_score') }}">
<input class="text-14 px-5 py-10 w-50percent" type="text" placeholder="Max Score"
value="{{ request('max_score') }}">
</div> </div>
</div> </div>
<div class="col col-sm-12"> <div class="row">
<div class="flex gap-20 justify-center items-center"> <div class="col col-12">
<button type="submit" <div class="flex items-center gap-10">
class="text-14 px-20 py-10 rounded-10 bg-sec text-white border-0">Submit</button> @if (!empty($item->intakes))
<a href="javascript:void(0)" onclick="resetForm()"><button <h6 class="text-16">Intake:</h6>
class="text-14 px-20 py-10 rounded-10 bg-brand text-white border-0">Reset</button></a> @forelse ($item->intakes as $value)
<h6 class="bg-sec text-14 text-white px-5 py-5 rounded-10 font-bold">
{{ $intakeOptions[$value] }}</h6>
</h6>
@empty
<span class="fs-13 text-muted mb-0 text-center"><span
class="badge bg-danger p-2">N/A</span></span>
@endforelse
@endif
</div>
</div> </div>
</div> </div>
</div>
</div>
</form>
<div class="py-20">
{{-- <div class="course-finder-box">
<div class="row">
<div class="col col-md-2">
<div class="sm:w-50percent w-full h-70">
<img class="w-full h-full" src="assets/images/general/university.jpg" alt="">
</div>
</div>
<div class="col col-md-7">
<div class="flex flex-col gap-5">
<h3 class="text-20 font-medium">(STEM) Bachelor of Architecture (BArch)</h3>
<h5 class="text-16 font-lighter">Marywood University <span class="text-brand">(USA)</span></h5>
<div class="flex gap-10 items-center">
<h6 class="text-grey font-medium text-14"><span class="font-bold">Code:</span>
BArch</h6>
<h6 class="text-grey font-medium text-14"><span class="font-bold">Fee:</span>
$41,3700 per year</h6>
<h6 class="text-grey font-medium text-14"><span class="font-bold">Schlorship:</span> Upto
$23,000</h6>
</div>
<div class="flex gap-10 items-center">
<h6 class="text-grey font-medium text-14"><span class="font-bold">Level:</span>
Bachelor</h6>
<h6 class="text-grey font-medium text-14"><span class="font-bold">Duration:</span> N/A
</h6>
</div> </div>
@empty
</div> <div class="text-center">
<p class="text-danger">No Course Found !!!</p>
</div> </div>
<div class="col col-md-3"> @endforelse
<div class="flex flex-col gap-10 "> {{ $programs->links() }}
<h6 class="text-black text-16 font-medium"><span class="font-bold">IELTS:</span>
5.5(5.5)</h6>
<h6 class="text-gray text-16 font-medium"><span class="font-bold">PTE:</span>
48(48)</h6>
<h6 class="text-gray text-16 font-medium"><span class="font-bold">Duolingo:</span>
90 Overall</h6>
</div>
</div> </div>
</div> </div>
<div class="col col-md-3">
<div class=" sticky top-60 " data-custom-animations="true"
data-ca-options='{"animationTarget": ".btn, h2", "ease": "power4.out", "initValues":{"x": "-10px", "y": "10px", "opacity":0} , "animations":{"x": "0px", "y": "0px", "opacity":1}}'>
<div
class="module-title flex flex-col h-full relative bg-size bg-no-repeat bg-center-right transition-all pt-30 pb-30 px-20 sm:mr-0 rounded-10">
<div class="row"> <div class="d-flex justify-center pb-10">
<div class="col col-12"> <h2
<div class="flex items-center gap-10"> class="ld-fh-element mb-0/2em inline-block relative leading-45 -mt-0/2em text-sec text-20">
<h6 class="text-16">Intake:</h6> Get Your Free Counselling!
<h6 class="bg-sec text-14 text-white px-5 py-5 rounded-10 font-bold">January </h2>
</h6> </div>
<h6 class="bg-sec text-14 text-white px-5 py-5 rounded-10 font-bold">January
</h6>
<form action="{{ route('enquiry.store') }}" method="post" id="contact-form">
@csrf
<input class="w-full mb-30 rounded-6 py-15 text-14 px-10 bg-light-blue border-light-grey"
type="text" name="name" id="" placeholder="Full Name">
<input class="w-full mb-30 rounded-6 py-15 text-14 px-10 bg-light-blue border-light-grey"
type="text" name="phone" id="" placeholder="Phone">
<input class="w-full mb-30 rounded-6 py-15 text-14 px-10 bg-light-blue border-light-grey"
type="email" name="email" id="" placeholder="Email">
<textarea class="w-full mb-20 rounded-6 py-15 text-14 px-10 bg-light-blue border-light-grey" name="subject"
id="" placeholder="Message"></textarea>
<button type="submit" id="submit-btn"
class="px-20 py-10 bg-sec text-white rounded-30 text-14 border-0 button-hover">Submit</button>
</form>
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="course-finder-box">
<div class="row">
<div class="col col-md-2">
<div class="sm:w-50percent w-full h-70">
<img class="w-full h-full" src="assets/images/general/university.jpg" alt="">
</div>
</div>
<div class="col col-md-7">
<div class="flex flex-col gap-5">
<h3 class="text-20 font-medium">(STEM) Bachelor of Architecture (BArch)</h3>
<h5 class="text-16 font-lighter">Marywood University <span class="text-brand">(USA)</span>
</h5>
<div class="flex gap-10 items-center">
<h6 class="text-grey font-medium text-14"><span class="font-bold">Code:</span>
BArch</h6>
<h6 class="text-grey font-medium text-14"><span class="font-bold">Fee:</span>
$41,3700 per year</h6>
<h6 class="text-grey font-medium text-14"><span class="font-bold">Schlorship:</span> Upto
$23,000</h6>
</div>
<div class="flex gap-10 items-center">
<h6 class="text-grey font-medium text-14"><span class="font-bold">Level:</span> Bachelor
</h6>
<h6 class="text-grey font-medium text-14"><span class="font-bold">Duration:</span> N/A
</h6>
</div>
</div>
</div>
<div class="col col-md-3">
<div class="flex flex-col gap-10 ">
<h6 class="text-black text-16 font-medium"><span class="font-bold">IELTS:</span>
5.5(5.5)</h6>
<h6 class="text-gray text-16 font-medium"><span class="font-bold">PTE:</span>
48(48)</h6>
<h6 class="text-gray text-16 font-medium"><span class="font-bold">Duolingo:</span>
90 Overall</h6>
</div>
</div>
</div>
<div class="row">
<div class="col col-12">
<div class="flex items-center gap-10">
<h6 class="text-16">Intake:</h6>
<h6 class="bg-sec text-14 text-white px-5 py-5 rounded-10 font-bold">January
</h6>
<h6 class="bg-sec text-14 text-white px-5 py-5 rounded-10 font-bold">January
</h6>
</div>
</div>
</div>
</div>
<div class="course-finder-box">
<div class="row">
<div class="col col-md-2">
<div class="sm:w-50percent w-full h-70">
<img class="w-full h-full" src="assets/images/general/university.jpg" alt="">
</div>
</div>
<div class="col col-md-7">
<div class="flex flex-col gap-5">
<h3 class="text-20 font-medium">(STEM) Bachelor of Architecture (BArch)</h3>
<h5 class="text-16 font-lighter">Marywood University <span class="text-brand">(USA)</span>
</h5>
<div class="flex gap-10 items-center">
<h6 class="text-grey font-medium text-14"><span class="font-bold">Code:</span>
BArch</h6>
<h6 class="text-grey font-medium text-14"><span class="font-bold">Fee:</span>
$41,3700 per year</h6>
<h6 class="text-grey font-medium text-14"><span class="font-bold">Schlorship:</span> Upto
$23,000</h6>
</div>
<div class="flex gap-10 items-center">
<h6 class="text-grey font-medium text-14"><span class="font-bold">Level:</span> Bachelor
</h6>
<h6 class="text-grey font-medium text-14"><span class="font-bold">Duration:</span> N/A
</h6>
</div>
</div>
</div>
<div class="col col-md-3">
<div class="flex flex-col gap-10 ">
<h6 class="text-black text-16 font-medium"><span class="font-bold">IELTS:</span>
5.5(5.5)</h6>
<h6 class="text-gray text-16 font-medium"><span class="font-bold">PTE:</span>
48(48)</h6>
<h6 class="text-gray text-16 font-medium"><span class="font-bold">Duolingo:</span>
90 Overall</h6>
</div>
</div>
</div>
<div class="row">
<div class="col col-12">
<div class="flex items-center gap-10">
<h6 class="text-16">Intake:</h6>
<h6 class="bg-sec text-14 text-white px-5 py-5 rounded-10 font-bold">January
</h6>
<h6 class="bg-sec text-14 text-white px-5 py-5 rounded-10 font-bold">January
</h6>
</div>
</div>
</div>
</div> --}}
<div class="text-center">
<p class="text-danger">No Course Found !!!</p>
</div> </div>
</div> </div>
</div> <!-- next row for b -->
<div class="col col-md-3"> <!-- form starts -->
<div class=" sticky top-60 " data-custom-animations="true"
data-ca-options='{"animationTarget": ".btn, h2", "ease": "power4.out", "initValues":{"x": "-10px", "y": "10px", "opacity":0} , "animations":{"x": "0px", "y": "0px", "opacity":1}}'>
<div
class="module-title flex flex-col h-full relative bg-size bg-no-repeat bg-center-right transition-all pt-30 pb-30 px-20 sm:mr-0 rounded-10">
<div class="d-flex justify-center pb-10">
<h2 class="ld-fh-element mb-0/2em inline-block relative leading-45 -mt-0/2em text-sec text-20">
Get Your Free Counselling!
</h2>
</div>
<form action="{{ route('enquiry.store') }}" method="post" id="contact-form">
@csrf
<input class="w-full mb-30 rounded-6 py-15 text-14 px-10 bg-light-blue border-light-grey" type="text"
name="name" id="" placeholder="Full Name">
<input class="w-full mb-30 rounded-6 py-15 text-14 px-10 bg-light-blue border-light-grey" type="text"
name="phone" id="" placeholder="Phone">
<input class="w-full mb-30 rounded-6 py-15 text-14 px-10 bg-light-blue border-light-grey"
type="email" name="email" id="" placeholder="Email">
<textarea class="w-full mb-20 rounded-6 py-15 text-14 px-10 bg-light-blue border-light-grey" name="subject"
id="" placeholder="Message"></textarea>
<button type="submit" id="submit-btn"
class="px-20 py-10 bg-sec text-white rounded-30 text-14 border-0 button-hover">Submit</button>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- next row for b -->
<!-- form starts -->
</div> </div>
@endsection @endsection
@push('js')
<script>
const url = "{{ route('program.getCoursesList') }}";
let isLoading = false;
$(document).ready(function() {
setTimeout(() => {
infiniteLoadMore(1)
}, 2000);
})
// var institutionSelect = $('.institution-select').select2();
$(document).on('submit', '#filter-course-form', function(event) {
event.preventDefault();
const page = 1;
if (!isLoading) {
isLoading = true;
infiniteLoadMore(page);
}
})
// $(document).on('click', '.reset-course-filter', function(event) {
// event.preventDefault();
// const page = 1;
// $('.institution-select').val(null).trigger('change.select2');
// institutionSelect.select2('destroy').select2();
// $('#filter-course-form')
// .find('input:not([type="hidden"]), select, textarea')
// .val('')
// .prop('checked', false)
// .prop('selected', false);
// if (!isLoading) {
// isLoading = true;
// infiniteLoadMore(page);
// }
// })
$(document).on('click', '.pagination .page-link', function(event) {
event.preventDefault();
const page = $(this).attr('href').split('page=')[1];
if (!isLoading) {
isLoading = true;
infiniteLoadMore(page);
}
});
function infiniteLoadMore(page) {
$.ajax({
url: `${url}?page=${page}`,
datatype: "html",
type: "GET",
data: $('#filter-course-form').serializeArray(),
beforeSend: function() {
$("#data-wrapper").empty();
$('.auto-load').show();
}
})
.done(function(response) {
if (response.html == '') {
$('#total-result').text(`Total Results: ${response.queryCount}`);
$('.pagination').closest().parent().find('nav').hide();
$("#data-wrapper").empty().append(`
<div class="card">
<div class="card-body">
<p class="d-flex align-items-center justify-content-center">
No data to display :(
</p>
</div>
</div>
`);
$('.auto-load').hide();
return;
}
$('.auto-load').hide();
$('#total-result').text(`Total Results: ${response.queryCount}`);
$("#data-wrapper").empty().append(response.html);
})
.fail(function(jqXHR, ajaxOptions, thrownError) {
console.log('Server error occurred');
})
.always(function() {
isLoading = false;
});
}
</script>
@endpush

View File

@@ -1,6 +1,5 @@
@extends('client.raffles.layouts.app') @extends('client.raffles.layouts.app')
@section('content') @section('content')
<div class="about-banner"> <div class="about-banner">
</div> </div>
<section class="container py-30 free-resources"> <section class="container py-30 free-resources">
@@ -26,7 +25,8 @@
data-bs-toggle="collapse" data-bs-parent="#accordion-questions" data-bs-toggle="collapse" data-bs-parent="#accordion-questions"
href="index.php#collapse-question-item-1" aria-expanded="false" href="index.php#collapse-question-item-1" aria-expanded="false"
aria-controls="collapse-question-item-1"> aria-controls="collapse-question-item-1">
<img class="w-40" src="{{asset('raffles/assets/images/icons/one.svg')}}" alt=""> <img class="w-40" src="{{ asset('raffles/assets/images/icons/one.svg') }}"
alt="">
<h5 class="text-16 p-0 m-0">Countries</h5> <h5 class="text-16 p-0 m-0">Countries</h5>
</a> </a>
</h4> </h4>
@@ -36,12 +36,12 @@
data-bs-parent="#accordion-questions" role="tabpanel" data-bs-parent="#accordion-questions" role="tabpanel"
aria-labelledby="heading-question-1"> aria-labelledby="heading-question-1">
@foreach($countries as $country) @foreach ($countries as $country)
<div class="accordion-content text-16 leading-20 text-black bg-white px-10 flex items-center gap-10" <div class="accordion-content text-16 leading-20 text-black bg-white px-10 flex items-center gap-10"
onclick="showTab('tab{{$country->title}}')"> onclick="showTab('tab{{ $country->title }}')">
<i class="fa-solid fa-angles-right text-18 text-brand"></i> <i class="fa-solid fa-angles-right text-18 text-brand"></i>
<p>{{$country->title}}</p> <p>{{ $country->title }}</p>
</div> </div>
@endforeach @endforeach
</div> </div>
@@ -60,7 +60,8 @@
data-bs-toggle="collapse" data-bs-parent="#accordion-questions" data-bs-toggle="collapse" data-bs-parent="#accordion-questions"
href="index.php#collapse-question-item-2" aria-expanded="false" href="index.php#collapse-question-item-2" aria-expanded="false"
aria-controls="collapse-question-item-2"> aria-controls="collapse-question-item-2">
<img class="w-40" src="{{asset('raffles/assets/images/icons/two.svg')}}" alt=""> <img class="w-40" src="{{ asset('raffles/assets/images/icons/two.svg') }}"
alt="">
<h5 class="text-16 p-0 m-0">Language Test</h5> <h5 class="text-16 p-0 m-0">Language Test</h5>
</a> </a>
</h4> </h4>
@@ -70,12 +71,12 @@
data-bs-parent="#accordion-questions" role="tabpanel" data-bs-parent="#accordion-questions" role="tabpanel"
aria-labelledby="heading-question-2"> aria-labelledby="heading-question-2">
@foreach($tests as $test) @foreach ($tests as $test)
<div class="accordion-content text-16 leading-20 text-black bg-white px-10 flex items-center gap-10" <div class="accordion-content text-16 leading-20 text-black bg-white px-10 flex items-center gap-10"
onclick="showTab('tab{{$test->title}}')"> onclick="showTab('tab{{ $test->title }}')">
<i class="fa-solid fa-angles-right text-18 text-brand"></i> <i class="fa-solid fa-angles-right text-18 text-brand"></i>
<p>{{$test->title}}</p> <p>{{ $test->title }}</p>
</div> </div>
@endforeach @endforeach
</div> </div>
@@ -93,7 +94,9 @@
data-bs-toggle="collapse" data-bs-parent="#accordion-questions" data-bs-toggle="collapse" data-bs-parent="#accordion-questions"
href="index.php#collapse-question-item-3" aria-expanded="false" href="index.php#collapse-question-item-3" aria-expanded="false"
aria-controls="collapse-question-item-3"> aria-controls="collapse-question-item-3">
<img class="w-40" src="{{asset('raffles/assets/images/icons/three.svg')}}" alt=""> <img class="w-40"
src="{{ asset('raffles/assets/images/icons/three.svg') }}"
alt="">
<h5 class="text-16 p-0 m-0">Support Services</h5> <h5 class="text-16 p-0 m-0">Support Services</h5>
</a> </a>
</h4> </h4>
@@ -103,13 +106,13 @@
data-bs-parent="#accordion-questions" role="tabpanel" data-bs-parent="#accordion-questions" role="tabpanel"
aria-labelledby="heading-question-2"> aria-labelledby="heading-question-2">
@foreach($services as $service) @foreach ($services as $service)
<div class="accordion-content text-16 leading-20 text-black bg-white px-10 flex items-center gap-10" <div class="accordion-content text-16 leading-20 text-black bg-white px-10 flex items-center gap-10"
onclick="showTab('tab{{$service->title}}')"> onclick="showTab('tab{{ $service->title }}')">
<i class="fa-solid fa-angles-right text-18 text-brand"></i> <i class="fa-solid fa-angles-right text-18 text-brand"></i>
<p>{{$service->title}}</p> <p>{{ $service->title }}</p>
</div> </div>
@endforeach @endforeach
</div> </div>
@@ -127,7 +130,7 @@
<div class="second-row"> <div class="second-row">
<div class="tab-content active lg:w-full lg:text-end bg-center bg-contain bg-no-repeat -mt-20" <div class="tab-content active lg:w-full lg:text-end bg-center bg-contain bg-no-repeat -mt-20"
style=" style="
background-image: url('{{asset('raffles/assets/images/demo/start-hub-1/shape-Blob.svg')}}); background-image: url('{{ asset('raffles/assets/images/demo/start-hub-1/shape-Blob.svg') }});
"> ">
<div data-custom-animations="true" <div data-custom-animations="true"
@@ -136,8 +139,8 @@
<div class="content-inside"> <div class="content-inside">
<div class="w-60percent h-400 mx-auto lqd-imggrp-single relative monkey-img" <div class="w-60percent h-400 mx-auto lqd-imggrp-single relative monkey-img"
data-float="ease-in-out"> data-float="ease-in-out">
<img class="w-full h-full " src="{{asset('raffles/assets/images/general/monkey.png')}}" <img class="w-full h-full "
alt=""> src="{{ asset('raffles/assets/images/general/monkey.png') }}" alt="">
<div class="absolute top-30 -left-20 flex gap-10 items-center"> <div class="absolute top-30 -left-20 flex gap-10 items-center">
<i class="fa-solid fa-arrow-left text-20 text-brand md:hiden"></i> <i class="fa-solid fa-arrow-left text-20 text-brand md:hiden"></i>
<i class="fa-solid fa-arrow-up text-20 text-brand md:bloc hidden"></i> <i class="fa-solid fa-arrow-up text-20 text-brand md:bloc hidden"></i>
@@ -151,139 +154,141 @@
</div> </div>
</div> </div>
@foreach($countries as $country) @foreach ($countries as $country)
<div class="tab-content " id="tab{{$country->title}}"> <div class="tab-content " id="tab{{ $country->title }}">
<div data-custom-animations="true" <div data-custom-animations="true"
data-ca-options='{"animationTarget": ".content-inside", "ease": "power4.out", "initValues":{"y": "-50px", "opacity":0} , "animations":{"y": "0px", "opacity":1}}'> data-ca-options='{"animationTarget": ".content-inside", "ease": "power4.out", "initValues":{"y": "-50px", "opacity":0} , "animations":{"y": "0px", "opacity":1}}'>
<div class="content-inside"> <div class="content-inside">
<h3 class="text-brand text-30 mb-30">{{$country->title}}</h3> <h3 class="text-brand text-30 mb-30">{{ $country->title }}</h3>
<table class=""> <table class="">
@php @php
$countryDocs = $country->documents()->get(); $countryDocs = $country->documents()->get();
@endphp @endphp
@foreach($countryDocs as $doc) @foreach ($countryDocs as $doc)
@php
$path = $doc->collection_name . '/' . $doc->file_path;
$full_path = Storage::disk('public')->url($path);
@endphp
@php <tr>
$path = $doc->collection_name . '/' . $doc->file_path; <td class="pl-20 text-brand text-16">{{ $loop->index + 1 }}</td>
$full_path = Storage::disk('public')->url($path) <td class="text-brand text-16">{{ $doc->title }}</td>
@endphp <td class=" flex items-center justify-end gap-10">
<a href="{{ $full_path }}" class="link-primary fs-15"
<tr> target="_blank">
<td class="pl-20 text-brand text-16">{{$loop->index + 1}}</td> <button
<td class="text-brand text-16">{{$doc->title}}</td> class="cursor-pointer px-20 py-10 bg-sec rounded-10 text-center text-white text-12 button-hover border-0">View</button>
<td class=" flex items-center justify-end gap-10"> </a>
<a href="{{ $full_path }}" class="link-primary fs-15" download> <a href="{{ $full_path }}" class="link-primary fs-15"
<button download>
class="cursor-pointer px-20 py-10 bg-sec rounded-10 text-center text-white text-12 button-hover border-0">View</button> <button
</a> class="cursor-pointer px-20 py-10 bg-green rounded-10 text-center text-white text-12 button-hover border-0">Download</button>
<a href="{{ $full_path }}" class="link-primary fs-15" download> </a>
<button </td>
class="cursor-pointer px-20 py-10 bg-green rounded-10 text-center text-white text-12 button-hover border-0">Download</button> </tr>
</a> @endforeach
</td> </table>
</tr> </div>
@endforeach
</table>
</div> </div>
</div> </div>
</div>
@endforeach @endforeach
@foreach($tests as $test) @foreach ($tests as $test)
<div class="tab-content " id="tab{{$test->title}}"> <div class="tab-content " id="tab{{ $test->title }}">
<div data-custom-animations="true" <div data-custom-animations="true"
data-ca-options='{"animationTarget": ".content-inside", "ease": "power4.out", "initValues":{"y": "-50px", "opacity":0} , "animations":{"y": "0px", "opacity":1}}'> data-ca-options='{"animationTarget": ".content-inside", "ease": "power4.out", "initValues":{"y": "-50px", "opacity":0} , "animations":{"y": "0px", "opacity":1}}'>
<div class="content-inside"> <div class="content-inside">
<h3 class="text-brand text-30 mb-30">{{$test->title}}</h3> <h3 class="text-brand text-30 mb-30">{{ $test->title }}</h3>
<table class=""> <table class="">
@php @php
$testDocs = $test->documents()->get(); $testDocs = $test->documents()->get();
@endphp @endphp
@foreach($testDocs as $docs) @foreach ($testDocs as $docs)
@php
$paths = $docs->collection_name . '/' . $docs->file_path;
$full_paths = Storage::disk('public')->url($paths);
@endphp
@php <tr>
$paths = $docs->collection_name . '/' . $docs->file_path; <td class="pl-20 text-brand text-16">{{ $loop->index + 1 }}</td>
$full_paths = Storage::disk('public')->url($paths) <td class="text-brand text-16">{{ $docs->title }}</td>
@endphp <td class=" flex items-center gap-10 justify-end">
<a href="{{ $full_paths }}" class="link-primary fs-15 "
target="_blank">
<button
class="cursor-pointer px-20 py-10 bg-sec rounded-10 text-center text-white text-12 button-hover border-0">View</button>
</a>
<a href="{{ $full_paths }}" class="link-primary fs-15"
download>
<button
class="cursor-pointer px-20 py-10 bg-green rounded-10 text-center text-white text-12 button-hover border-0">Download</button>
</a>
</td>
</tr>
@endforeach
<tr> </table>
<td class="pl-20 text-brand text-16">{{$loop->index + 1}}</td> </div>
<td class="text-brand text-16">{{$docs->title}}</td>
<td class=" flex items-center gap-10 justify-end">
<a href="{{ $full_paths }}" class="link-primary fs-15" download>
<button
class="cursor-pointer px-20 py-10 bg-sec rounded-10 text-center text-white text-12 button-hover border-0">View</button>
</a>
<a href="{{ $full_paths }}" class="link-primary fs-15" download>
<button
class="cursor-pointer px-20 py-10 bg-green rounded-10 text-center text-white text-12 button-hover border-0">Download</button>
</a>
</td>
</tr>
@endforeach
</table>
</div> </div>
</div> </div>
</div>
@endforeach @endforeach
@foreach($services as $service) @foreach ($services as $service)
<div class="tab-content " id="tab{{$service->title}}"> <div class="tab-content " id="tab{{ $service->title }}">
<div data-custom-animations="true" <div data-custom-animations="true"
data-ca-options='{"animationTarget": ".content-inside", "ease": "power4.out", "initValues":{"y": "-50px", "opacity":0} , "animations":{"y": "0px", "opacity":1}}'> data-ca-options='{"animationTarget": ".content-inside", "ease": "power4.out", "initValues":{"y": "-50px", "opacity":0} , "animations":{"y": "0px", "opacity":1}}'>
<div class="content-inside"> <div class="content-inside">
<h3 class="text-brand text-30 mb-30">{{$service->title}}</h3> <h3 class="text-brand text-30 mb-30">{{ $service->title }}</h3>
<table class=""> <table class="">
@php @php
$serviceDocs = $service->documents()->get(); $serviceDocs = $service->documents()->get();
@endphp @endphp
@foreach($serviceDocs as $docss) @foreach ($serviceDocs as $docss)
@php
$pathss = $docss->collection_name . '/' . $docss->file_path;
$full_pathss = Storage::disk('public')->url($pathss);
@endphp
@php <tr>
$pathss = $docss->collection_name . '/' . $docss->file_path; <td class="pl-20 text-brand text-16">{{ $loop->index + 1 }}</td>
$full_pathss = Storage::disk('public')->url($pathss) <td class="text-brand text-16">{{ $docss->title }}</td>
@endphp <td class=" flex items-center gap-10 justify-end">
<a href="{{ $full_pathss }}" class="link-primary fs-15"
<tr> target="_blank">
<td class="pl-20 text-brand text-16">{{$loop->index + 1}}</td> <button
<td class="text-brand text-16">{{$docss->title}}</td> class="cursor-pointer px-20 py-10 bg-sec rounded-10 text-center text-white text-12 button-hover border-0">View</button>
<td class=" flex items-center gap-10 justify-end"> </a>
<a href="{{ $full_pathss }}" class="link-primary fs-15" download> <a href="{{ $full_pathss }}" class="link-primary fs-15"
<button download>
class="cursor-pointer px-20 py-10 bg-sec rounded-10 text-center text-white text-12 button-hover border-0">View</button> <button
</a> class="cursor-pointer px-20 py-10 bg-green rounded-10 text-center text-white text-12 button-hover border-0">Download</button>
<a href="{{ $full_pathss }}" class="link-primary fs-15" download> </a>
<button </td>
class="cursor-pointer px-20 py-10 bg-green rounded-10 text-center text-white text-12 button-hover border-0">Download</button> </tr>
</a> @endforeach
</td> </table>
</tr> </div>
@endforeach
</table>
</div> </div>
</div> </div>
</div>
@endforeach @endforeach
</div> </div>
@@ -299,9 +304,10 @@
<div class="divider"></div> <div class="divider"></div>
<ul class="flex-flex-col gap-20 list-none px-0 py-20"> <ul class="flex-flex-col gap-20 list-none px-0 py-20">
@foreach($countries as $country) @foreach ($countries as $country)
<li class="py-10 border-bottom text-16 text-hover"><a class="text-grey " <li class="py-10 border-bottom text-16 text-hover"><a class="text-grey "
href="{{route('country.single', $country->slug)}}">{{$country->title}}</a></li> href="{{ route('country.single', $country->slug) }}">{{ $country->title }}</a>
</li>
@endforeach @endforeach
</ul> </ul>