Compare commits
75 Commits
9b45e88f27
...
main
Author | SHA1 | Date | |
---|---|---|---|
e0f1fb9892 | |||
c61caabe93 | |||
22a7876a10 | |||
1d517d6bbd | |||
2e0fa5a29c | |||
507d71888e | |||
b092a69b30 | |||
5b5e19f919 | |||
f8f496077b | |||
3666b749ea | |||
086395a0a4 | |||
2ca99f9dbc | |||
3f503c2d38 | |||
032e8405ca | |||
f22a60fef4 | |||
5299aa268f | |||
40d34a7692 | |||
658d3600a2 | |||
dc32ac8f91 | |||
9d371a8d0f | |||
0c9adf1c7a | |||
087c19dc4a | |||
0c92a6f518 | |||
2d8c43691f | |||
27f371955c | |||
1ee87559da | |||
6ef55240a0 | |||
6d71fe4b4a | |||
52732b0f09 | |||
a11de7be9e | |||
faa2e77a46 | |||
f55aeec8e8 | |||
b24e6a9c66 | |||
5f8c1aed38 | |||
10b549315f | |||
4c272e0e67 | |||
724f46a82c | |||
1a744e1e2f | |||
0652a07452 | |||
d966b75f56 | |||
bce7ec8d3a | |||
31bea937c4 | |||
711ae9caf9 | |||
ce09f98c55 | |||
d29b3ba489 | |||
7f9d6bc8ec | |||
7155c1a6fc | |||
6e9b6291d3 | |||
622b9e9445 | |||
3148715b73 | |||
6ff22bc02d | |||
badfdc4c70 | |||
3bfb3f2b20 | |||
2a2222d0c6 | |||
a57e00191a | |||
c77828de8c | |||
50a2b09cfa | |||
a504987ac1 | |||
e80c67c0e2 | |||
a145943bd1 | |||
3ca3681513 | |||
fb52c42208 | |||
d5de6658f0 | |||
f2bd2dd1c1 | |||
d357125961 | |||
8c6719e6c3 | |||
df97f3c842 | |||
efd675d576 | |||
7c25b17de9 | |||
54a662b973 | |||
f6339f909e | |||
3bda70472d | |||
d15949d9c2 | |||
73c20015a8 | |||
8953fa8d19 |
137
Modules/CCMS/app/Http/Controllers/CareerController.php
Normal file
137
Modules/CCMS/app/Http/Controllers/CareerController.php
Normal file
@@ -0,0 +1,137 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\CCMS\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
use Modules\CCMS\Models\Career;
|
||||||
|
use Yajra\DataTables\Facades\DataTables;
|
||||||
|
|
||||||
|
class CareerController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display a listing of the resource.
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
if (request()->ajax()) {
|
||||||
|
$model = Career::query()->orderBy('order');
|
||||||
|
return DataTables::eloquent($model)
|
||||||
|
->addIndexColumn()
|
||||||
|
->setRowClass('tableRow')
|
||||||
|
->editColumn('status', function (Career $career) {
|
||||||
|
$status = $career->status ? 'Published' : 'Draft';
|
||||||
|
$color = $career->status ? 'text-success' : 'text-danger';
|
||||||
|
return "<p class='{$color}'>{$status}</p>";
|
||||||
|
})
|
||||||
|
->addColumn('action', 'ccms::career.datatable.action')
|
||||||
|
->rawColumns(['status', 'action'])
|
||||||
|
->toJson();
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('ccms::career.index', [
|
||||||
|
'title' => 'Career List',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for creating a new resource.
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
$careerOptions = Career::where('status', 1)->pluck('job_title', 'id');
|
||||||
|
return view('ccms::career.create', [
|
||||||
|
'title' => 'Create Career',
|
||||||
|
'editable' => false,
|
||||||
|
'careerOptions' => $careerOptions
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store a newly created resource in storage.
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
$maxOrder = Career::max('order');
|
||||||
|
$order = $maxOrder ? ++$maxOrder : 1;
|
||||||
|
|
||||||
|
$request->mergeIfMissing([
|
||||||
|
'slug' => Str::slug($request->title),
|
||||||
|
// 'order' => $order,
|
||||||
|
]);
|
||||||
|
|
||||||
|
Career::create($request->all());
|
||||||
|
flash()->success("Career has been created!");
|
||||||
|
return redirect()->route('career.index');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the specified resource.
|
||||||
|
*/
|
||||||
|
public function show($id)
|
||||||
|
{
|
||||||
|
return view('ccms::show');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for editing the specified resource.
|
||||||
|
*/
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
$careerOptions = Career::where('status', 1)->pluck('job_title', 'id');
|
||||||
|
|
||||||
|
$career = Career::findOrFail($id);
|
||||||
|
return view('ccms::career.edit', [
|
||||||
|
'title' => 'Edit Career',
|
||||||
|
'editable' => true,
|
||||||
|
'career' => $career,
|
||||||
|
'careerOptions' => $careerOptions
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the specified resource in storage.
|
||||||
|
*/
|
||||||
|
public function update(Request $request, $id)
|
||||||
|
{
|
||||||
|
$request->merge([
|
||||||
|
'slug' => Str::slug($request->title),
|
||||||
|
]);
|
||||||
|
$validated = $request->validate([]);
|
||||||
|
$career = Career::findOrFail($id);
|
||||||
|
$career->update($request->all());
|
||||||
|
flash()->success("Career has been updated.");
|
||||||
|
return redirect()->back();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the specified resource from storage.
|
||||||
|
*/
|
||||||
|
public function destroy($id)
|
||||||
|
{
|
||||||
|
$career = Career::findOrFail($id);
|
||||||
|
$career->delete();
|
||||||
|
return response()->json(['status' => 200, 'message' => "Career has been deleted."], 200);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function reorder(Request $request)
|
||||||
|
{
|
||||||
|
$careers = Career::all();
|
||||||
|
foreach ($careers as $career) {
|
||||||
|
foreach ($request->order as $order) {
|
||||||
|
if ($order['id'] == $career->id) {
|
||||||
|
$career->update(['order' => $order['position']]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return response(['status' => true, 'message' => 'Reordered successfully'], 200);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function toggle($id)
|
||||||
|
{
|
||||||
|
$career = Career::findOrFail($id);
|
||||||
|
$career->update(['status' => !$career->status]);
|
||||||
|
return response(['status' => 200, 'message' => 'Toggled successfully'], 200);
|
||||||
|
}
|
||||||
|
}
|
@@ -20,8 +20,11 @@ class CounselorController extends Controller
|
|||||||
$model = Counselor::query()->latest();
|
$model = Counselor::query()->latest();
|
||||||
return DataTables::eloquent($model)
|
return DataTables::eloquent($model)
|
||||||
->addIndexColumn()
|
->addIndexColumn()
|
||||||
|
->addColumn('checkbox', function (Counselor $enquiry) {
|
||||||
|
return '<input type="checkbox" class="enquiry-select" value="' . $enquiry->id . '" data-name="' . $enquiry->name . '">';
|
||||||
|
})
|
||||||
->addColumn('action', 'ccms::counselor.datatable.action')
|
->addColumn('action', 'ccms::counselor.datatable.action')
|
||||||
->rawColumns(['action'])
|
->rawColumns(['checkbox', 'action'])
|
||||||
->toJson();
|
->toJson();
|
||||||
}
|
}
|
||||||
return view('ccms::counselor.index', [
|
return view('ccms::counselor.index', [
|
||||||
|
@@ -18,10 +18,14 @@ class EnquiryController extends Controller
|
|||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
|
// $is_enrolled = request()->get('is_enrolled', null);
|
||||||
if (request()->ajax()) {
|
if (request()->ajax()) {
|
||||||
$model = Enquiry::query()->latest();
|
$model = Enquiry::query()->latest();
|
||||||
return DataTables::eloquent($model)
|
return DataTables::eloquent($model)
|
||||||
->addIndexColumn()
|
->addIndexColumn()
|
||||||
|
->addColumn('checkbox', function (Enquiry $enquiry) {
|
||||||
|
return '<input type="checkbox" class="enquiry-select" value="' . $enquiry->id . '">';
|
||||||
|
})
|
||||||
->setRowClass(function (Enquiry $enquiry) {
|
->setRowClass(function (Enquiry $enquiry) {
|
||||||
return $enquiry->is_read ? 'text-muted' : 'text-dark';
|
return $enquiry->is_read ? 'text-muted' : 'text-dark';
|
||||||
})
|
})
|
||||||
@@ -35,7 +39,7 @@ class EnquiryController extends Controller
|
|||||||
return $enquiry->message ?? '-';
|
return $enquiry->message ?? '-';
|
||||||
})
|
})
|
||||||
->addColumn('action', 'ccms::enquiry.datatable.action')
|
->addColumn('action', 'ccms::enquiry.datatable.action')
|
||||||
->rawColumns(['action'])
|
->rawColumns(['checkbox', 'action'])
|
||||||
->toJson();
|
->toJson();
|
||||||
}
|
}
|
||||||
return view('ccms::enquiry.index', [
|
return view('ccms::enquiry.index', [
|
||||||
@@ -60,6 +64,7 @@ class EnquiryController extends Controller
|
|||||||
$rules = [
|
$rules = [
|
||||||
'name' => 'required|string',
|
'name' => 'required|string',
|
||||||
'email' => 'required|email',
|
'email' => 'required|email',
|
||||||
|
'mobile' => 'required|string',
|
||||||
'digits:10',
|
'digits:10',
|
||||||
'subject' => 'nullable',
|
'subject' => 'nullable',
|
||||||
'message' => 'nullable|max:250',
|
'message' => 'nullable|max:250',
|
||||||
@@ -140,4 +145,34 @@ class EnquiryController extends Controller
|
|||||||
return redirect()->back()->with('error', $th->getMessage());
|
return redirect()->back()->with('error', $th->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function bulkAction(Request $request)
|
||||||
|
{
|
||||||
|
$ids = $request->ids;
|
||||||
|
$action = $request->action;
|
||||||
|
|
||||||
|
if (!$ids || !$action) {
|
||||||
|
return response()->json(['message' => 'No action performed.'], 400);
|
||||||
|
}
|
||||||
|
|
||||||
|
$enquiries = Enquiry::whereIn('id', $ids)->get();
|
||||||
|
|
||||||
|
if ($action == 2) {
|
||||||
|
// Example: send newsletter
|
||||||
|
foreach ($enquiries as $enquiry) {
|
||||||
|
// Your newsletter logic here
|
||||||
|
}
|
||||||
|
return response()->json(['message' => 'Newsletter sent to selected enquiries!']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($action == 3) {
|
||||||
|
// Example: send normal mail
|
||||||
|
foreach ($enquiries as $enquiry) {
|
||||||
|
// Your mail logic here
|
||||||
|
}
|
||||||
|
return response()->json(['message' => 'Mails sent to selected enquiries!']);
|
||||||
|
}
|
||||||
|
|
||||||
|
return response()->json(['message' => 'Invalid action.'], 400);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
147
Modules/CCMS/app/Http/Controllers/EventController.php
Normal file
147
Modules/CCMS/app/Http/Controllers/EventController.php
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\CCMS\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
use Modules\CCMS\Models\Event;
|
||||||
|
use Yajra\DataTables\Facades\DataTables;
|
||||||
|
|
||||||
|
class EventController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display a listing of the resource.
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
if (request()->ajax()) {
|
||||||
|
$model = Event::query()->orderBy('order');
|
||||||
|
return DataTables::eloquent($model)
|
||||||
|
->addIndexColumn()
|
||||||
|
->setRowClass('tableRow')
|
||||||
|
->editColumn('image', function (Event $event) {
|
||||||
|
return $event->getRawOriginal('image') ? "<img src='{$event->image}' alt='{$event->title}' class='rounded avatar-sm material-shadow ms-2 img-thumbnail'>" : '-';
|
||||||
|
})
|
||||||
|
->editColumn('parent_id', function (Event $event) {
|
||||||
|
return $event->parent ? "<span class='badge bg-primary p-1'>{$event->parent?->title}</span>" : '-';
|
||||||
|
})
|
||||||
|
->editColumn('status', function (Event $event) {
|
||||||
|
$status = $event->status ? 'Published' : 'Draft';
|
||||||
|
$color = $event->status ? 'text-success' : 'text-danger';
|
||||||
|
return "<p class='{$color}'>{$status}</p>";
|
||||||
|
})
|
||||||
|
->addColumn('action', 'ccms::event.datatable.action')
|
||||||
|
->rawColumns(['parent_id', 'image', 'status', 'action'])
|
||||||
|
->toJson();
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('ccms::event.index', [
|
||||||
|
'title' => 'Event List',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for creating a new resource.
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
$eventOptions = Event::where('status', 1)->pluck('title', 'id');
|
||||||
|
return view('ccms::event.create', [
|
||||||
|
'title' => 'Create Event',
|
||||||
|
'editable' => false,
|
||||||
|
'eventOptions' => $eventOptions
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store a newly created resource in storage.
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
$maxOrder = Event::max('order');
|
||||||
|
$order = $maxOrder ? ++$maxOrder : 1;
|
||||||
|
|
||||||
|
$request->mergeIfMissing([
|
||||||
|
'slug' => Str::slug($request->title),
|
||||||
|
'order' => $order,
|
||||||
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$validated = $request->validate([
|
||||||
|
'title' => 'required',
|
||||||
|
]);
|
||||||
|
Event::create($request->all());
|
||||||
|
flash()->success("Event has been created!");
|
||||||
|
return redirect()->route('event.index');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the specified resource.
|
||||||
|
*/
|
||||||
|
public function show($id)
|
||||||
|
{
|
||||||
|
return view('ccms::show');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for editing the specified resource.
|
||||||
|
*/
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
$eventOptions = Event::where('status', 1)->pluck('title', 'id');
|
||||||
|
$event = Event::findOrFail($id);
|
||||||
|
return view('ccms::event.edit', [
|
||||||
|
'title' => 'Edit Event',
|
||||||
|
'editable' => true,
|
||||||
|
'event' => $event,
|
||||||
|
'eventOptions' => $eventOptions
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the specified resource in storage.
|
||||||
|
*/
|
||||||
|
public function update(Request $request, $id)
|
||||||
|
{
|
||||||
|
$request->merge([
|
||||||
|
'slug' => Str::slug($request->title),
|
||||||
|
]);
|
||||||
|
$validated = $request->validate([]);
|
||||||
|
$event = Event::findOrFail($id);
|
||||||
|
$event->update($request->all());
|
||||||
|
flash()->success("Event has been updated.");
|
||||||
|
return redirect()->back();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the specified resource from storage.
|
||||||
|
*/
|
||||||
|
public function destroy($id)
|
||||||
|
{
|
||||||
|
$event = Event::findOrFail($id);
|
||||||
|
$event->delete();
|
||||||
|
return response()->json(['status' => 200, 'message' => "Event has been deleted."], 200);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function reorder(Request $request)
|
||||||
|
{
|
||||||
|
$events = Event::all();
|
||||||
|
foreach ($events as $event) {
|
||||||
|
foreach ($request->order as $order) {
|
||||||
|
if ($order['id'] == $event->id) {
|
||||||
|
$event->update(['order' => $order['position']]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return response(['status' => true, 'message' => 'Reordered successfully'], 200);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function toggle($id)
|
||||||
|
{
|
||||||
|
$event = Event::findOrFail($id);
|
||||||
|
$event->update(['status' => !$event->status]);
|
||||||
|
return response(['status' => 200, 'message' => 'Toggled successfully'], 200);
|
||||||
|
}
|
||||||
|
}
|
118
Modules/CCMS/app/Http/Controllers/FranchiseController.php
Normal file
118
Modules/CCMS/app/Http/Controllers/FranchiseController.php
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\CCMS\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Rules\Recaptcha;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Http\Response;
|
||||||
|
use Illuminate\Support\Facades\Validator;
|
||||||
|
use Modules\CCMS\Models\Franchise;
|
||||||
|
use Yajra\DataTables\Facades\DataTables;
|
||||||
|
|
||||||
|
class FranchiseController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display a listing of the resource.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
if (request()->ajax()) {
|
||||||
|
$model = Franchise::query()->latest();
|
||||||
|
return DataTables::eloquent($model)
|
||||||
|
->addIndexColumn()
|
||||||
|
->addColumn('checkbox', function (Franchise $enquiry) {
|
||||||
|
return '<input type="checkbox" class="enquiry-select" value="' . $enquiry->id . '" data-name="' . $enquiry->name . '">';
|
||||||
|
})
|
||||||
|
->addColumn('action', 'ccms::franchise.datatable.action')
|
||||||
|
->rawColumns(['checkbox', 'action'])
|
||||||
|
->toJson();
|
||||||
|
}
|
||||||
|
return view('ccms::franchise.index', [
|
||||||
|
'title' => 'Franchise List',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for creating a new resource.
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store a newly created resource in storage.
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$rules = [
|
||||||
|
'first_name' => 'required|string',
|
||||||
|
'email' => 'required|email',
|
||||||
|
];
|
||||||
|
|
||||||
|
if (setting('enable_reCaptcha') == 1) {
|
||||||
|
$rules['g-recaptcha-response'] = ['required', new Recaptcha];
|
||||||
|
}
|
||||||
|
|
||||||
|
$messages = [
|
||||||
|
'email.email' => 'Must be a valid email address.',
|
||||||
|
'g-recaptcha-response.required' => 'Please complete reCAPTCHA validation.',
|
||||||
|
'g-recaptcha-response' => 'Invalid reCAPTCHA.',
|
||||||
|
];
|
||||||
|
|
||||||
|
$validator = Validator::make($request->all(), $rules, $messages);
|
||||||
|
if ($validator->fails()) {
|
||||||
|
return response()->json(['errors' => $validator->errors()], 422);
|
||||||
|
}
|
||||||
|
|
||||||
|
Franchise::create($request->all());
|
||||||
|
|
||||||
|
return response()->json(['status' => 200, 'message' => "Thank you for reaching out! Your message has been received and we'll get back to you shortly."], 200);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return response()->json(['status' => 500, 'message' => 'Internal server error', 'error' => $e->getMessage()], 500);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the specified resource.
|
||||||
|
*/
|
||||||
|
public function show($id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for editing the specified resource.
|
||||||
|
*/
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the specified resource in storage.
|
||||||
|
*/
|
||||||
|
public function update(Request $request, $id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the specified resource from storage.
|
||||||
|
*/
|
||||||
|
public function destroy($id)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$franchise = Franchise::whereId($id)->first();
|
||||||
|
if ($franchise) {
|
||||||
|
$franchise->delete();
|
||||||
|
}
|
||||||
|
return response()->json(['status' => 200, 'message' => 'Franchise has been deleted!'], 200);
|
||||||
|
} catch (\Throwable $th) {
|
||||||
|
return redirect()->back()->with('error', $th->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
117
Modules/CCMS/app/Http/Controllers/NewsletterController.php
Normal file
117
Modules/CCMS/app/Http/Controllers/NewsletterController.php
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\CCMS\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Rules\Recaptcha;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Http\Response;
|
||||||
|
use Illuminate\Support\Facades\Validator;
|
||||||
|
use Modules\CCMS\Models\Newsletter;
|
||||||
|
use Yajra\DataTables\Facades\DataTables;
|
||||||
|
|
||||||
|
class NewsletterController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display a listing of the resource.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
if (request()->ajax()) {
|
||||||
|
$model = Newsletter::query()->latest();
|
||||||
|
return DataTables::eloquent($model)
|
||||||
|
->addIndexColumn()
|
||||||
|
->addColumn('checkbox', function (Newsletter $enquiry) {
|
||||||
|
return '<input type="checkbox" class="enquiry-select" value="' . $enquiry->id . '" data-name="' . $enquiry->name . '">';
|
||||||
|
})
|
||||||
|
->addColumn('action', 'ccms::newsletter.datatable.action')
|
||||||
|
->rawColumns(['checkbox', 'action'])
|
||||||
|
->toJson();
|
||||||
|
}
|
||||||
|
return view('ccms::newsletter.index', [
|
||||||
|
'title' => 'Newsletter List',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for creating a new resource.
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store a newly created resource in storage.
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$rules = [
|
||||||
|
'email' => 'required|email|unique:newsletters,email',
|
||||||
|
];
|
||||||
|
|
||||||
|
if (setting('enable_reCaptcha') == 1) {
|
||||||
|
$rules['g-recaptcha-response'] = ['required', new Recaptcha];
|
||||||
|
}
|
||||||
|
|
||||||
|
$messages = [
|
||||||
|
'email.email' => 'Must be a valid and unique email address.',
|
||||||
|
'g-recaptcha-response.required' => 'Please complete reCAPTCHA validation.',
|
||||||
|
'g-recaptcha-response' => 'Invalid reCAPTCHA.',
|
||||||
|
];
|
||||||
|
|
||||||
|
$validator = Validator::make($request->all(), $rules, $messages);
|
||||||
|
if ($validator->fails()) {
|
||||||
|
return response()->json(['errors' => $validator->errors()], 422);
|
||||||
|
}
|
||||||
|
|
||||||
|
Newsletter::create($validator->validated());
|
||||||
|
|
||||||
|
return response()->json(['status' => 200, 'message' => "Thank you for reaching out! Your message has been received and we'll get back to you shortly."], 200);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return response()->json(['status' => 500, 'message' => 'Internal server error', 'error' => $e->getMessage()], 500);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the specified resource.
|
||||||
|
*/
|
||||||
|
public function show($id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for editing the specified resource.
|
||||||
|
*/
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the specified resource in storage.
|
||||||
|
*/
|
||||||
|
public function update(Request $request, $id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the specified resource from storage.
|
||||||
|
*/
|
||||||
|
public function destroy($id)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$newsletter = Newsletter::whereId($id)->first();
|
||||||
|
if ($newsletter) {
|
||||||
|
$newsletter->delete();
|
||||||
|
}
|
||||||
|
return response()->json(['status' => 200, 'message' => 'Newsletter has been deleted!'], 200);
|
||||||
|
} catch (\Throwable $th) {
|
||||||
|
return redirect()->back()->with('error', $th->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -16,7 +16,7 @@ class PageController extends Controller
|
|||||||
* Display a listing of the resource.
|
* Display a listing of the resource.
|
||||||
*/
|
*/
|
||||||
public function index(Request $request)
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
$parentPages = Page::where(['status' => 1, 'type' => 'page'])->with("children")->get();
|
$parentPages = Page::where(['status' => 1, 'type' => 'page'])->with("children")->get();
|
||||||
|
|
||||||
if ($request->ajax()) {
|
if ($request->ajax()) {
|
||||||
@@ -67,7 +67,7 @@ class PageController extends Controller
|
|||||||
'title' => 'Page List',
|
'title' => 'Page List',
|
||||||
'parentPages' => $parentPages,
|
'parentPages' => $parentPages,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -92,7 +92,7 @@ class PageController extends Controller
|
|||||||
$order = $maxOrder ? ++$maxOrder : 1;
|
$order = $maxOrder ? ++$maxOrder : 1;
|
||||||
$request->merge([
|
$request->merge([
|
||||||
'order' => $order,
|
'order' => $order,
|
||||||
'status' => 0,
|
'status' => 1,
|
||||||
'slug' => $request->title == 'Homepage' ? '/' : Str::slug($request->title),
|
'slug' => $request->title == 'Homepage' ? '/' : Str::slug($request->title),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
138
Modules/CCMS/app/Http/Controllers/VacancyController.php
Normal file
138
Modules/CCMS/app/Http/Controllers/VacancyController.php
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\CCMS\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Rules\Recaptcha;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Http\Response;
|
||||||
|
use Illuminate\Support\Facades\Validator;
|
||||||
|
use Modules\CCMS\Models\Vacancy;
|
||||||
|
use Yajra\DataTables\Facades\DataTables;
|
||||||
|
|
||||||
|
class VacancyController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display a listing of the resource.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
if (request()->ajax()) {
|
||||||
|
$model = Vacancy::query()->latest();
|
||||||
|
return DataTables::eloquent($model)
|
||||||
|
->addIndexColumn()
|
||||||
|
->addColumn('checkbox', function (Vacancy $enquiry) {
|
||||||
|
return '<input type="checkbox" class="enquiry-select" value="' . $enquiry->id . '" data-name="' . $enquiry->name . '">';
|
||||||
|
})
|
||||||
|
->addColumn('action', 'ccms::vacancy.datatable.action')
|
||||||
|
->rawColumns(['checkbox', 'action'])
|
||||||
|
->toJson();
|
||||||
|
}
|
||||||
|
return view('ccms::vacancy.index', [
|
||||||
|
'title' => 'Vacancy List',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for creating a new resource.
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store a newly created resource in storage.
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
// $rules = [
|
||||||
|
|
||||||
|
|
||||||
|
// ];
|
||||||
|
|
||||||
|
// if (setting('enable_reCaptcha') == 1) {
|
||||||
|
// $rules['g-recaptcha-response'] = ['required', new Recaptcha];
|
||||||
|
// }
|
||||||
|
|
||||||
|
// $messages = [
|
||||||
|
// 'email.email' => 'Must be a valid email address.',
|
||||||
|
// 'g-recaptcha-response.required' => 'Please complete reCAPTCHA validation.',
|
||||||
|
// 'g-recaptcha-response' => 'Invalid reCAPTCHA.',
|
||||||
|
// ];
|
||||||
|
|
||||||
|
// $validator = Validator::make($request->all());
|
||||||
|
// if ($validator->fails()) {
|
||||||
|
// return response()->json(['errors' => $validator->errors()], 422);
|
||||||
|
// }
|
||||||
|
|
||||||
|
$modelClass = "Modules\\CCMS\\Models\\Career";
|
||||||
|
|
||||||
|
$model = $modelClass::findOrFail($request->career_id);
|
||||||
|
foreach ($request->document as $file) {
|
||||||
|
$model->addToDocumentCollection(collectionName: 'uploads/document', file: $file, documentName: $request->first_name, referenceDocumentId: null);
|
||||||
|
}
|
||||||
|
|
||||||
|
Vacancy::create($request->all());
|
||||||
|
|
||||||
|
return response()->json(['status' => 200, 'message' => "Thank you for reaching out! Your message has been received and we'll get back to you shortly."], 200);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return response()->json(['status' => 500, 'message' => 'Internal server error', 'error' => $e->getMessage()], 500);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the specified resource.
|
||||||
|
*/
|
||||||
|
public function show($id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for editing the specified resource.
|
||||||
|
*/
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the specified resource in storage.
|
||||||
|
*/
|
||||||
|
public function update(Request $request, $id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the specified resource from storage.
|
||||||
|
*/
|
||||||
|
public function destroy($id)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$vacancy = Vacancy::whereId($id)->first();
|
||||||
|
if ($vacancy) {
|
||||||
|
$vacancy->delete();
|
||||||
|
}
|
||||||
|
return response()->json(['status' => 200, 'message' => 'Vacancy has been deleted!'], 200);
|
||||||
|
} catch (\Throwable $th) {
|
||||||
|
return redirect()->back()->with('error', $th->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function markAsRead($id)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$vacancy = Vacancy::whereId($id)->first();
|
||||||
|
if ($vacancy) {
|
||||||
|
$vacancy->update(['is_read' => 1]);
|
||||||
|
}
|
||||||
|
return response()->json(['status' => 200, 'message' => 'Vacancy has been marked as read!'], 200);
|
||||||
|
} catch (\Throwable $th) {
|
||||||
|
return redirect()->back()->with('error', $th->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
97
Modules/CCMS/app/Models/Career.php
Normal file
97
Modules/CCMS/app/Models/Career.php
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\CCMS\Models;
|
||||||
|
|
||||||
|
|
||||||
|
use App\Traits\CreatedUpdatedBy;
|
||||||
|
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Modules\CCMS\Traits\UpdateCustomFields;
|
||||||
|
use Modules\Document\Models\Document;
|
||||||
|
use App\Traits\AddToDocumentCollection;
|
||||||
|
|
||||||
|
class Career extends Model
|
||||||
|
{
|
||||||
|
use HasFactory, UpdateCustomFields, AddToDocumentCollection, CreatedUpdatedBy;
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'department',
|
||||||
|
'job_title',
|
||||||
|
'job_description',
|
||||||
|
'job_requirements',
|
||||||
|
'salary_range',
|
||||||
|
'location',
|
||||||
|
'position',
|
||||||
|
'start_date',
|
||||||
|
'end_date',
|
||||||
|
'status',
|
||||||
|
'createdby',
|
||||||
|
'updatedby',
|
||||||
|
'order',
|
||||||
|
];
|
||||||
|
|
||||||
|
protected function casts(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'custom' => 'array',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function images(): Attribute
|
||||||
|
{
|
||||||
|
return Attribute::make(
|
||||||
|
get: function ($value) {
|
||||||
|
if (empty($value)) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
$parts = explode(',', $value);
|
||||||
|
return array_map(fn($part) => asset(trim($part)), $parts);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function image(): Attribute
|
||||||
|
{
|
||||||
|
return Attribute::make(
|
||||||
|
get: fn($value) => asset($value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function banner(): Attribute
|
||||||
|
{
|
||||||
|
return Attribute::make(
|
||||||
|
get: fn($value) => asset($value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function sidebarImage(): Attribute
|
||||||
|
{
|
||||||
|
return Attribute::make(
|
||||||
|
get: fn($value) => asset($value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function iconImage(): Attribute
|
||||||
|
{
|
||||||
|
return Attribute::make(
|
||||||
|
get: fn($value) => asset($value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function children()
|
||||||
|
{
|
||||||
|
return $this->hasMany(Career::class, 'parent_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function parent()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Career::class, 'parent_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function documents()
|
||||||
|
{
|
||||||
|
return $this->morphMany(Document::class, 'documentable');
|
||||||
|
}
|
||||||
|
}
|
@@ -23,6 +23,7 @@ class Country extends Model
|
|||||||
'slug',
|
'slug',
|
||||||
'short_description',
|
'short_description',
|
||||||
'description',
|
'description',
|
||||||
|
'faqs',
|
||||||
'image',
|
'image',
|
||||||
'parent_id',
|
'parent_id',
|
||||||
'images',
|
'images',
|
||||||
@@ -104,5 +105,4 @@ class Country extends Model
|
|||||||
{
|
{
|
||||||
return $this->morphMany(Document::class, 'documentable');
|
return $this->morphMany(Document::class, 'documentable');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
113
Modules/CCMS/app/Models/Event.php
Normal file
113
Modules/CCMS/app/Models/Event.php
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\CCMS\Models;
|
||||||
|
|
||||||
|
use App\Traits\CreatedUpdatedBy;
|
||||||
|
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Modules\CCMS\Traits\UpdateCustomFields;
|
||||||
|
use Modules\Document\Models\Document;
|
||||||
|
use App\Traits\AddToDocumentCollection;
|
||||||
|
|
||||||
|
class Event extends Model
|
||||||
|
{
|
||||||
|
use HasFactory, UpdateCustomFields, AddToDocumentCollection, CreatedUpdatedBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*/
|
||||||
|
protected $fillable = [
|
||||||
|
'title',
|
||||||
|
'slug',
|
||||||
|
'short_description',
|
||||||
|
'description',
|
||||||
|
'parent_id',
|
||||||
|
'icon_class',
|
||||||
|
'icon_image',
|
||||||
|
'image',
|
||||||
|
'images',
|
||||||
|
'start_date',
|
||||||
|
'end_date',
|
||||||
|
'custom',
|
||||||
|
'banner',
|
||||||
|
'meta_title',
|
||||||
|
'meta_description',
|
||||||
|
'meta_keywords',
|
||||||
|
'sidebar_title',
|
||||||
|
'sidebar_content',
|
||||||
|
'sidebar_image',
|
||||||
|
'button_text',
|
||||||
|
'button_url',
|
||||||
|
'button_target',
|
||||||
|
'status',
|
||||||
|
'createdby',
|
||||||
|
'updatedby',
|
||||||
|
'order',
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
protected function casts(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'custom' => 'array',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function images(): Attribute
|
||||||
|
{
|
||||||
|
return Attribute::make(
|
||||||
|
get: function ($value) {
|
||||||
|
if (empty($value)) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
$parts = explode(',', $value);
|
||||||
|
return array_map(fn($part) => asset(trim($part)), $parts);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function image(): Attribute
|
||||||
|
{
|
||||||
|
return Attribute::make(
|
||||||
|
get: fn($value) => asset($value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function banner(): Attribute
|
||||||
|
{
|
||||||
|
return Attribute::make(
|
||||||
|
get: fn($value) => asset($value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function sidebarImage(): Attribute
|
||||||
|
{
|
||||||
|
return Attribute::make(
|
||||||
|
get: fn($value) => asset($value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function iconImage(): Attribute
|
||||||
|
{
|
||||||
|
return Attribute::make(
|
||||||
|
get: fn($value) => asset($value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function children()
|
||||||
|
{
|
||||||
|
return $this->hasMany(Event::class, 'parent_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function parent()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Event::class, 'parent_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function documents()
|
||||||
|
{
|
||||||
|
return $this->morphMany(Document::class, 'documentable');
|
||||||
|
}
|
||||||
|
}
|
37
Modules/CCMS/app/Models/Franchise.php
Normal file
37
Modules/CCMS/app/Models/Franchise.php
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\CCMS\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
// use Modules\CCMS\Database\Factories\FranchiseFactory;
|
||||||
|
|
||||||
|
class Franchise extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*/
|
||||||
|
protected $fillable = [
|
||||||
|
'first_name',
|
||||||
|
'last_name',
|
||||||
|
'email',
|
||||||
|
'phone',
|
||||||
|
'address',
|
||||||
|
'city',
|
||||||
|
'state',
|
||||||
|
'invest_level',
|
||||||
|
'own_business',
|
||||||
|
'yes_own_des',
|
||||||
|
'franchise_location',
|
||||||
|
'start_time_frame',
|
||||||
|
'office_setup',
|
||||||
|
'website'
|
||||||
|
];
|
||||||
|
|
||||||
|
// protected static function newFactory(): FranchiseFactory
|
||||||
|
// {
|
||||||
|
// // return FranchiseFactory::new();
|
||||||
|
// }
|
||||||
|
}
|
19
Modules/CCMS/app/Models/Newsletter.php
Normal file
19
Modules/CCMS/app/Models/Newsletter.php
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\CCMS\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
// use Modules\CCMS\Database\Factories\NewsletterFactory;
|
||||||
|
|
||||||
|
class Newsletter extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*/
|
||||||
|
protected $fillable = ['email'];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@@ -19,12 +19,10 @@ class Partner extends Model
|
|||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'title',
|
'title',
|
||||||
'slug',
|
'slug',
|
||||||
'link',
|
|
||||||
'image',
|
'image',
|
||||||
|
|
||||||
'status',
|
'status',
|
||||||
|
'linka',
|
||||||
'order',
|
'order',
|
||||||
|
|
||||||
'createdby',
|
'createdby',
|
||||||
'updatedby',
|
'updatedby',
|
||||||
];
|
];
|
||||||
|
21
Modules/CCMS/app/Models/Vacancy.php
Normal file
21
Modules/CCMS/app/Models/Vacancy.php
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\CCMS\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
// use Modules\CCMS\Database\Factories\VacancyFactory;
|
||||||
|
|
||||||
|
class vacancy extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'first_name',
|
||||||
|
'last_name',
|
||||||
|
'email',
|
||||||
|
'phone',
|
||||||
|
'qualification',
|
||||||
|
'description',
|
||||||
|
];
|
||||||
|
}
|
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('countries', function (Blueprint $table) {
|
||||||
|
$table->longText('faqs')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('countries', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('faqs');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('newsletters', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('email')->unique();
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('newsletters');
|
||||||
|
}
|
||||||
|
};
|
@@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('franchises', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('first_name')->nullable();
|
||||||
|
$table->string('last_name')->nullable();
|
||||||
|
$table->string('email')->nullable();
|
||||||
|
$table->string('phone')->nullable();
|
||||||
|
$table->string('address')->nullable();
|
||||||
|
$table->string('city')->nullable();
|
||||||
|
$table->string('state')->nullable();
|
||||||
|
$table->string('invest_level')->nullable();
|
||||||
|
$table->string('own_business')->nullable();
|
||||||
|
$table->text('yes_own_des')->nullable();
|
||||||
|
$table->string('franchise_location')->nullable();
|
||||||
|
$table->string('start_time_frame')->nullable();
|
||||||
|
$table->string('office_setup')->nullable();
|
||||||
|
$table->string('website')->nullable();
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('franchises');
|
||||||
|
}
|
||||||
|
};
|
@@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('events', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->text('title');
|
||||||
|
$table->text('slug')->nullable();
|
||||||
|
$table->text('short_description')->nullable();
|
||||||
|
$table->longText('description')->nullable();
|
||||||
|
$table->json('custom')->nullable();
|
||||||
|
$table->integer('parent_id')->unsigned()->nullable();
|
||||||
|
|
||||||
|
$table->string('image')->nullable();
|
||||||
|
$table->string('banner')->nullable();
|
||||||
|
|
||||||
|
$table->text('images')->nullable();
|
||||||
|
$table->date('start_date')->nullable();
|
||||||
|
$table->date('end_date')->nullable();
|
||||||
|
$table->text('meta_title')->nullable();
|
||||||
|
$table->text('meta_description')->nullable();
|
||||||
|
$table->text('meta_keywords')->nullable();
|
||||||
|
|
||||||
|
$table->text('sidebar_title')->nullable();
|
||||||
|
$table->mediumText('sidebar_content')->nullable();
|
||||||
|
$table->string('sidebar_image')->nullable();
|
||||||
|
|
||||||
|
$table->string('button_text')->nullable();
|
||||||
|
$table->string('button_url')->nullable();
|
||||||
|
$table->string('button_target')->nullable();
|
||||||
|
|
||||||
|
$table->integer('status')->default(1);
|
||||||
|
$table->string('icon_class')->nullable();
|
||||||
|
$table->string('icon_image')->nullable();
|
||||||
|
$table->integer('createdby')->unsigned()->nullable();
|
||||||
|
$table->integer('updatedby')->unsigned()->nullable();
|
||||||
|
$table->integer('order')->nullable();
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('events');
|
||||||
|
}
|
||||||
|
};
|
@@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('careers', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('department')->nullable();
|
||||||
|
$table->string('job_title')->nullable();
|
||||||
|
$table->text('job_description')->nullable();
|
||||||
|
$table->text('job_requirements')->nullable();
|
||||||
|
$table->string('salary_range')->nullable();
|
||||||
|
$table->string('location')->nullable();
|
||||||
|
$table->string('position')->nullable();
|
||||||
|
$table->date('start_date')->nullable();
|
||||||
|
$table->date('end_date')->nullable();
|
||||||
|
$table->integer('status')->default(1);
|
||||||
|
$table->integer('createdby')->unsigned()->nullable();
|
||||||
|
$table->integer('updatedby')->unsigned()->nullable();
|
||||||
|
$table->integer('order')->nullable();
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('careers');
|
||||||
|
}
|
||||||
|
};
|
@@ -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.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('vacancies', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('first_name')->nullable();
|
||||||
|
$table->string('last_name')->nullable();
|
||||||
|
$table->string('email')->nullable();
|
||||||
|
$table->string('phone')->nullable();
|
||||||
|
$table->string('qualification')->nullable();
|
||||||
|
$table->text('description')->nullable();
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('vacancies');
|
||||||
|
}
|
||||||
|
};
|
16
Modules/CCMS/resources/views/career/create.blade.php
Normal file
16
Modules/CCMS/resources/views/career/create.blade.php
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
@section('content')
|
||||||
|
<x-dashboard.breadcumb :title="$title" />
|
||||||
|
<div class="container-fluid">
|
||||||
|
@if ($errors->any())
|
||||||
|
<x-flash-message type="danger" :messages="$errors->all()" />
|
||||||
|
@endif
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xl-12">
|
||||||
|
{{ html()->form('POST')->route('career.store')->class('needs-validation')->attributes(['novalidate'])->open() }}
|
||||||
|
@include('ccms::career.partials._form')
|
||||||
|
{{ html()->form()->close() }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
@@ -0,0 +1,12 @@
|
|||||||
|
<div class="hstack flex-wrap gap-3">
|
||||||
|
<a href="{{ route('career.edit', $id) }}" data-bs-toggle="tooltip"
|
||||||
|
data-bs-placement="bottom" data-bs-title="Edit" class="link-success fs-15 edit-item-btn"><i
|
||||||
|
class=" ri-edit-2-line"></i></a>
|
||||||
|
|
||||||
|
<a data-link="{{ route('career.toggle', $id) }}" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Toggle" data-status="{{ $status == 1 ? 'Draft' : 'Published' }}"
|
||||||
|
class="link-info fs-15 toggle-item"><i class="{{ $status == 1 ? 'ri-toggle-line' : 'ri-toggle-fill' }}"></i></a>
|
||||||
|
|
||||||
|
<a href="javascript:void(0);" data-link="{{ route('career.destroy', $id) }}" class="link-danger fs-15 remove-item"
|
||||||
|
data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Delete"><i class="ri-delete-bin-6-line"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
16
Modules/CCMS/resources/views/career/edit.blade.php
Normal file
16
Modules/CCMS/resources/views/career/edit.blade.php
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
@section('content')
|
||||||
|
<x-dashboard.breadcumb :title="$title" />
|
||||||
|
<div class="container-fluid">
|
||||||
|
@if ($errors->any())
|
||||||
|
<x-flash-message type="danger" :messages="$errors->all()" />
|
||||||
|
@endif
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xl-12">
|
||||||
|
{{ html()->modelForm($career, 'PUT')->route('career.update', $career->id)->class('needs-validation')->attributes(['novalidate'])->open() }}
|
||||||
|
@include('ccms::career.partials._form')
|
||||||
|
{{ html()->closeModelForm() }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
51
Modules/CCMS/resources/views/career/index.blade.php
Normal file
51
Modules/CCMS/resources/views/career/index.blade.php
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container-fluid">
|
||||||
|
<x-dashboard.breadcumb :title="$title" />
|
||||||
|
@if ($errors->any())
|
||||||
|
<x-flash-message type="danger" :messages="$errors->all()" />
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xl-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header d-flex align-items-center justify-content-between">
|
||||||
|
<h5 class="card-title mb-0">{{ $title }}</h5>
|
||||||
|
<a href="{{ route('career.create') }}" class="btn btn-primary waves-effect waves-light text-white"><i
|
||||||
|
class="ri-add-line align-middle"></i> Create</a>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
@php
|
||||||
|
$columns = [
|
||||||
|
[
|
||||||
|
'title' => 'S.N',
|
||||||
|
'data' => 'DT_RowIndex',
|
||||||
|
'name' => 'DT_RowIndex',
|
||||||
|
'orderable' => false,
|
||||||
|
'searchable' => false,
|
||||||
|
'sortable' => false,
|
||||||
|
],
|
||||||
|
['title' => 'Job Title', 'data' => 'job_title', 'name' => 'job_title'],
|
||||||
|
['title' => 'Start Date', 'data' => 'start_date', 'name' => 'start_date'],
|
||||||
|
['title' => 'End Date', 'data' => 'end_date', 'name' => 'end_date'],
|
||||||
|
['title' => 'Department', 'data' => 'department', 'name' => 'department'],
|
||||||
|
['title' => 'Location', 'data' => 'location', 'name' => 'location'],
|
||||||
|
['title' => 'Position', 'data' => 'position', 'name' => 'position'],
|
||||||
|
['title' => 'Salary', 'data' => 'salary_range', 'name' => 'salary_range'],
|
||||||
|
['title' => 'Status', 'data' => 'status', 'name' => 'status'],
|
||||||
|
[
|
||||||
|
'title' => 'Action',
|
||||||
|
'data' => 'action',
|
||||||
|
'orderable' => false,
|
||||||
|
'searchable' => false,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
@endphp
|
||||||
|
<x-data-table-script :route="route('career.index')" :reorder="route('career.reorder')" :columns="$columns" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
220
Modules/CCMS/resources/views/career/partials/_form.blade.php
Normal file
220
Modules/CCMS/resources/views/career/partials/_form.blade.php
Normal file
@@ -0,0 +1,220 @@
|
|||||||
|
<div class="row">
|
||||||
|
<div class="col-xl-8">
|
||||||
|
<div class="card h-auto">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row gy-3">
|
||||||
|
<div class="col-md-6">
|
||||||
|
{{ html()->label('Job Title')->class('form-label')->for('job_title') }}
|
||||||
|
{{ html()->span('*')->class('text-danger') }}
|
||||||
|
{{ html()->text('job_title')->class('form-control')->placeholder('Enter Job Title')->required(true) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
{{ html()->label('Department')->class('form-label')->for('department') }}
|
||||||
|
{{ html()->span('*')->class('text-danger') }}
|
||||||
|
{{ html()->text('department')->class('form-control')->placeholder('Enter Department')->required(true) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
{{ html()->label('Vacancy Start Date')->class('form-label') }}
|
||||||
|
<div class="input-group">
|
||||||
|
{{ html()->text('start_date')->class('form-control')->id('career-start-date')->placeholder('Vacancy Start Date')->attributes([
|
||||||
|
'data-provider' => 'flatpickr',
|
||||||
|
'data-date-format' => 'Y-m-d',
|
||||||
|
'data-enable-time' => '',
|
||||||
|
])->required() }}
|
||||||
|
<span class="input-group-text"><i class="ri-calendar-career-line"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
{{ html()->label('Vacancy End Date')->class('form-label') }}
|
||||||
|
<div class="input-group">
|
||||||
|
{{ html()->text('end_date')->class('form-control')->id('career-end-date')->placeholder('Vacancy End Date')->attributes([
|
||||||
|
'data-provider' => 'flatpickr',
|
||||||
|
'data-date-format' => 'Y-m-d',
|
||||||
|
'data-enable-time' => '',
|
||||||
|
]) }}
|
||||||
|
<span class="input-group-text"><i class="ri-calendar-career-line"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
{{ html()->label('Salary Range')->class('form-label')->for('salary_range') }}
|
||||||
|
{{ html()->span('*')->class('text-danger') }}
|
||||||
|
{{ html()->text('salary_range')->class('form-control')->placeholder('Enter Salary Range')->required(true) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
{{ html()->label('Location')->class('form-label')->for('location') }}
|
||||||
|
{{ html()->span('*')->class('text-danger') }}
|
||||||
|
{{ html()->text('location')->class('form-control')->placeholder('Enter location')->required(true) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12">
|
||||||
|
{{ html()->label('Position')->class('form-label')->for('position') }}
|
||||||
|
{{ html()->span('*')->class('text-danger') }}
|
||||||
|
{{ html()->text('position')->class('form-control')->placeholder('Enter Position (e.g. Fresher, Intermidiate, Senior)')->required(true) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12">
|
||||||
|
{{ html()->label('Job Description')->class('form-label')->for('job_description') }}
|
||||||
|
{{ html()->textarea('job_description')->class('form-control')->placeholder('Enter Job Description (JD)')->rows(5) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12">
|
||||||
|
{{ html()->label('Job Requirements')->class('form-label')->for('job_requirements') }}
|
||||||
|
{{ html()->textarea('job_requirements')->class('form-control ckeditor-classic')->placeholder('Enter Job Requirements') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- <x-ccms::custom-form-field :data="$career->custom ?? []" /> --}}
|
||||||
|
|
||||||
|
<div class="card meta-section">
|
||||||
|
<div class="card-header">
|
||||||
|
<h6 class="card-title mb-0 fs-14">Meta</h6>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xl-12 col-sm-12">
|
||||||
|
{{ html()->label('Meta Title')->class('form-label')->for('meta_title') }}
|
||||||
|
{{ html()->text('meta_title')->class('form-control mb-3')->placeholder('Meta Title') }}
|
||||||
|
</div>
|
||||||
|
<div class="col-xl-12 col-sm-12">
|
||||||
|
{{ html()->label('Meta Keywords')->class('form-label')->for('meta_keywords') }}
|
||||||
|
{{ html()->textarea('meta_keywords')->class('form-control mb-3')->placeholder('Meta Keywords') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-xl-12 col-sm-12">
|
||||||
|
{{ html()->label('Meta Description')->class('form-label')->for('meta_description') }}
|
||||||
|
{{ html()->textarea('meta_description')->class('form-control mb-3')->placeholder('Meta wire:Description')->rows(3) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-xl-4">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h6 class="card-title mb-0 fs-14">
|
||||||
|
Published
|
||||||
|
</h6>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
{{ html()->label('Status')->class('form-label visually-hidden')->for('status') }}
|
||||||
|
{{ html()->select('status', config('constants.page_status_options'))->class('form-select choices-select') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<x-form-buttons :href="route('career.index')" :label="isset($career) ? 'Update' : 'Create'" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h6 class="card-title mb-0 fs-14">
|
||||||
|
Page Attributes
|
||||||
|
</h6>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
{{ html()->label('Parent Event')->class('form-label')->for('parent_id') }}
|
||||||
|
{{ html()->select('parent_id', $careerOptions ?? [])->value($career->parent_id ?? old('parent_id'))->class('form-select choices-select')->placeholder('Select') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card media-gallery-section">
|
||||||
|
<div class="card-header">
|
||||||
|
<h6 class="card-title mb-0 fs-14">
|
||||||
|
Icon
|
||||||
|
</h6>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="mb-3">
|
||||||
|
{{ html()->label('Icon')->class('form-label')->for('icon_class') }}
|
||||||
|
{{ html()->text('icon_class')->class('form-control')->placeholder('Icon class') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ html()->label('Icon Image')->class('form-label')->for('icon_image') }}
|
||||||
|
<x-image-input :data="$editable ? $career->getRawOriginal('icon_image') : null" id="icon_image" name="icon_image" :editable="$editable" :multiple=false />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="card featured-image-section">
|
||||||
|
<div class="card-header">
|
||||||
|
<h6 class="card-title mb-0 fs-14">
|
||||||
|
Featured Image
|
||||||
|
</h6>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="mb-3">
|
||||||
|
{{ html()->label('Featured')->class('form-label')->for('image') }}
|
||||||
|
<x-image-input :data="$editable ? $career->getRawOriginal('image') : null" id="image" name="image" :editable="$editable" :multiple=false />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ html()->label('Banner')->class('form-label')->for('banner') }}
|
||||||
|
<x-image-input :data="$editable ? $career->getRawOriginal('banner') : null" id="banner" name="banner" :editable="$editable" :multiple=false />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card media-gallery-section">
|
||||||
|
<div class="card-header">
|
||||||
|
<h6 class="card-title mb-0 fs-14">
|
||||||
|
Media Gallery
|
||||||
|
</h6>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<x-image-input :editable="$editable" id="images" name="images" :data="$editable ? $career->getRawOriginal('images') : null" :multiple="true"
|
||||||
|
label="Select Images" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card sidebar-section">
|
||||||
|
<div class="card-header d-flex jusitfy-content-between align-items-center">
|
||||||
|
<h6 class="card-title mb-0 fs-14">Sidebar</h6>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row gy-3">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
{{ html()->label('Title')->class('form-label')->for('sidebar_title') }}
|
||||||
|
{{ html()->text('sidebar_title')->class('form-control') }}
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-12">
|
||||||
|
{{ html()->label('Content')->class('form-label')->for('sidebar_content') }}
|
||||||
|
{{ html()->textarea('sidebar_content')->class('form-control')->placeholder('Short Content (optional)')->rows(3) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-12">
|
||||||
|
{{ html()->label('Image')->class('form-label')->for('sidebar_content') }}
|
||||||
|
<x-image-input :data="$editable ? $career->getRawOriginal('sidebar_image') : null" id="sidebar_image" name="sidebar_image" :editable="$editable"
|
||||||
|
:multiple=false />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card button-section">
|
||||||
|
<div class="card-header d-flex jusitfy-content-between align-items-center">
|
||||||
|
<h6 class="card-title mb-0 fs-14">Button</h6>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row gy-3">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
{{ html()->label('Text')->class('form-label')->for('button_text') }}
|
||||||
|
{{ html()->text('button_text')->class('form-control') }}
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-12">
|
||||||
|
{{ html()->label('Link')->class('form-label')->for('button_url') }}
|
||||||
|
{{ html()->text('button_url')->class('form-control')->placeholder('Button Link') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-12">
|
||||||
|
{{ html()->label('Target')->class('form-label')->for('button_target') }}
|
||||||
|
{{ html()->select('button_target', config('constants.redirect_options'))->class('form-select choices-select') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
@@ -10,12 +10,13 @@
|
|||||||
@php
|
@php
|
||||||
$columns = [
|
$columns = [
|
||||||
[
|
[
|
||||||
'title' => 'S.N',
|
'title' => '<input type="checkbox" id="select-all">',
|
||||||
'data' => 'DT_RowIndex',
|
'data' => 'checkbox',
|
||||||
'name' => 'DT_RowIndex',
|
'name' => 'checkbox',
|
||||||
'orderable' => false,
|
'orderable' => false,
|
||||||
'searchable' => false,
|
'searchable' => false,
|
||||||
'sortable' => false,
|
'className' => 'align-middle',
|
||||||
|
'width' => '1%',
|
||||||
],
|
],
|
||||||
['title' => 'Name', 'data' => 'name', 'name' => 'name'],
|
['title' => 'Name', 'data' => 'name', 'name' => 'name'],
|
||||||
['title' => 'Email', 'data' => 'email', 'name' => 'email'],
|
['title' => 'Email', 'data' => 'email', 'name' => 'email'],
|
||||||
@@ -32,6 +33,20 @@
|
|||||||
@endphp
|
@endphp
|
||||||
<x-data-table-script :route="route('counselor.index')" :reorder="null" :columns="$columns" />
|
<x-data-table-script :route="route('counselor.index')" :reorder="null" :columns="$columns" />
|
||||||
</div>
|
</div>
|
||||||
|
<div class="card" id="customerList">
|
||||||
|
|
||||||
|
<div class="card-body p-2">
|
||||||
|
{{-- <div class="table-responsive">
|
||||||
|
{{ $dataTable->table(['class' => 'table table-sm w-100', 'data-is_enrolled' => $is_enrolled], true) }}
|
||||||
|
</div> --}}
|
||||||
|
|
||||||
|
<div class="row mt-3">
|
||||||
|
<div class="col-md-3">
|
||||||
|
{{ html()->select('action', [2 => 'Send News Letter', 3 => 'Send Mail'])->placeholder('Bulk Actions')->class('form-select bulk-select') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
@@ -19,6 +19,11 @@
|
|||||||
{{ html()->span('*')->class('text-danger') }}
|
{{ html()->span('*')->class('text-danger') }}
|
||||||
{{ html()->textarea('description')->class('form-control ckeditor-classic')->placeholder('Enter Country Description')->required() }}
|
{{ html()->textarea('description')->class('form-control ckeditor-classic')->placeholder('Enter Country Description')->required() }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12">
|
||||||
|
{{ html()->label('Extra FAQs')->class('form-label')->for('faqs') }}
|
||||||
|
{{ html()->textarea('faqs')->class('form-control ckeditor-classic')->placeholder('Enter Extra FAQs')->required() }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -87,13 +92,11 @@
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
{{ html()->label('Featured')->class('form-label')->for('image') }}
|
{{ html()->label('Featured')->class('form-label')->for('image') }}
|
||||||
<x-image-input :data="$editable ? $country->getRawOriginal('image') : null" id="image" name="image" :editable="$editable"
|
<x-image-input :data="$editable ? $country->getRawOriginal('image') : null" id="image" name="image" :editable="$editable" :multiple=false />
|
||||||
:multiple=false />
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ html()->label('Banner')->class('form-label')->for('banner') }}
|
{{ html()->label('Banner')->class('form-label')->for('banner') }}
|
||||||
<x-image-input :data="$editable ? $country->getRawOriginal('banner') : null" id="banner" name="banner" :editable="$editable"
|
<x-image-input :data="$editable ? $country->getRawOriginal('banner') : null" id="banner" name="banner" :editable="$editable" :multiple=false />
|
||||||
:multiple=false />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@@ -8,18 +8,21 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
@php
|
@php
|
||||||
|
// IMPORTANT: 'data' must match the key returned by DataTables JSON.
|
||||||
|
// Your controller uses ->addColumn('checkbox', ...), so use 'checkbox' here.
|
||||||
$columns = [
|
$columns = [
|
||||||
[
|
[
|
||||||
'title' => 'S.N',
|
'title' => '<input type="checkbox" id="select-all">',
|
||||||
'data' => 'DT_RowIndex',
|
'data' => 'checkbox', // <-- was 'select'
|
||||||
'name' => 'DT_RowIndex',
|
'name' => 'checkbox',
|
||||||
'orderable' => false,
|
'orderable' => false,
|
||||||
'searchable' => false,
|
'searchable' => false,
|
||||||
'sortable' => false,
|
'className' => 'align-middle',
|
||||||
|
'width' => '1%',
|
||||||
],
|
],
|
||||||
['title' => 'Name', 'data' => 'name', 'name' => 'name'],
|
['title' => 'Name', 'data' => 'name', 'name' => 'name'],
|
||||||
['title' => 'Email', 'data' => 'email', 'name' => 'email'],
|
['title' => 'Email', 'data' => 'email', 'name' => 'email'],
|
||||||
['title' => 'Contact', 'data' => 'mobile', 'name' => 'mobile'],
|
['title' => 'Mobile', 'data' => 'mobile', 'name' => 'mobile'],
|
||||||
['title' => 'Class', 'data' => 'class', 'name' => 'class'],
|
['title' => 'Class', 'data' => 'class', 'name' => 'class'],
|
||||||
['title' => 'Subject', 'data' => 'subject', 'name' => 'subject'],
|
['title' => 'Subject', 'data' => 'subject', 'name' => 'subject'],
|
||||||
['title' => 'Message', 'data' => 'message', 'name' => 'message'],
|
['title' => 'Message', 'data' => 'message', 'name' => 'message'],
|
||||||
@@ -31,8 +34,72 @@
|
|||||||
],
|
],
|
||||||
];
|
];
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
<x-data-table-script :route="route('enquiry.index')" :reorder="null" :columns="$columns" />
|
<x-data-table-script :route="route('enquiry.index')" :reorder="null" :columns="$columns" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
|
@push('js')
|
||||||
|
<script>
|
||||||
|
$(function () {
|
||||||
|
// Initialize DataTable ONCE on the correct selector
|
||||||
|
const enquiryTable = $('.ajax-datatable').DataTable({
|
||||||
|
columnDefs: [
|
||||||
|
{ targets: 0, orderable: false, searchable: false } // disable checkbox col
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
// Keep master checkbox cleared on redraws (pagination/filtering)
|
||||||
|
enquiryTable.on('draw', function () {
|
||||||
|
$('#select-all').prop('checked', false);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Select/Deselect all (current page rows)
|
||||||
|
$(document).on('change', '#select-all', function () {
|
||||||
|
const checked = this.checked;
|
||||||
|
const rows = enquiryTable.rows({ page: 'current' }).nodes();
|
||||||
|
$('.enquiry-select', rows).prop('checked', checked);
|
||||||
|
});
|
||||||
|
|
||||||
|
// When any row checkbox changes, sync master checkbox state for current page
|
||||||
|
$(document).on('change', '.enquiry-select', function () {
|
||||||
|
const rows = enquiryTable.rows({ page: 'current' }).nodes();
|
||||||
|
const total = $('.enquiry-select', rows).length;
|
||||||
|
const checked = $('.enquiry-select:checked', rows).length;
|
||||||
|
$('#select-all').prop('checked', total > 0 && checked === total);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Bulk action (optional)
|
||||||
|
$('.bulk-select').on('change', function () {
|
||||||
|
const action = $(this).val();
|
||||||
|
const ids = $('.enquiry-select:checked').map(function () { return this.value; }).get();
|
||||||
|
|
||||||
|
if (!ids.length) {
|
||||||
|
alert('Please select at least one enquiry.');
|
||||||
|
$(this).val('');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (action == 2 || action == 3) {
|
||||||
|
$.ajax({
|
||||||
|
url: "{{ route('enquiry.bulkAction') }}",
|
||||||
|
method: "POST",
|
||||||
|
data: {
|
||||||
|
_token: "{{ csrf_token() }}",
|
||||||
|
action: action,
|
||||||
|
ids: ids
|
||||||
|
},
|
||||||
|
success: function (res) {
|
||||||
|
alert(res.message);
|
||||||
|
enquiryTable.ajax.reload(null, false); // keep page
|
||||||
|
$('.bulk-select').val('');
|
||||||
|
$('#select-all').prop('checked', false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
@endpush
|
||||||
|
16
Modules/CCMS/resources/views/event/create.blade.php
Normal file
16
Modules/CCMS/resources/views/event/create.blade.php
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
@section('content')
|
||||||
|
<x-dashboard.breadcumb :title="$title" />
|
||||||
|
<div class="container-fluid">
|
||||||
|
@if ($errors->any())
|
||||||
|
<x-flash-message type="danger" :messages="$errors->all()" />
|
||||||
|
@endif
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xl-12">
|
||||||
|
{{ html()->form('POST')->route('event.store')->class('needs-validation')->attributes(['novalidate'])->open() }}
|
||||||
|
@include('ccms::event.partials._form')
|
||||||
|
{{ html()->form()->close() }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
@@ -0,0 +1,12 @@
|
|||||||
|
<div class="hstack flex-wrap gap-3">
|
||||||
|
<a href="{{ route('event.edit', $id) }}" data-bs-toggle="tooltip"
|
||||||
|
data-bs-placement="bottom" data-bs-title="Edit" class="link-success fs-15 edit-item-btn"><i
|
||||||
|
class=" ri-edit-2-line"></i></a>
|
||||||
|
|
||||||
|
<a data-link="{{ route('event.toggle', $id) }}" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Toggle" data-status="{{ $status == 1 ? 'Draft' : 'Published' }}"
|
||||||
|
class="link-info fs-15 toggle-item"><i class="{{ $status == 1 ? 'ri-toggle-line' : 'ri-toggle-fill' }}"></i></a>
|
||||||
|
|
||||||
|
<a href="javascript:void(0);" data-link="{{ route('event.destroy', $id) }}" class="link-danger fs-15 remove-item"
|
||||||
|
data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Delete"><i class="ri-delete-bin-6-line"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
16
Modules/CCMS/resources/views/event/edit.blade.php
Normal file
16
Modules/CCMS/resources/views/event/edit.blade.php
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
@section('content')
|
||||||
|
<x-dashboard.breadcumb :title="$title" />
|
||||||
|
<div class="container-fluid">
|
||||||
|
@if ($errors->any())
|
||||||
|
<x-flash-message type="danger" :messages="$errors->all()" />
|
||||||
|
@endif
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xl-12">
|
||||||
|
{{ html()->modelForm($event, 'PUT')->route('event.update', $event->id)->class('needs-validation')->attributes(['novalidate'])->open() }}
|
||||||
|
@include('ccms::event.partials._form')
|
||||||
|
{{ html()->closeModelForm() }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
49
Modules/CCMS/resources/views/event/index.blade.php
Normal file
49
Modules/CCMS/resources/views/event/index.blade.php
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container-fluid">
|
||||||
|
<x-dashboard.breadcumb :title="$title" />
|
||||||
|
@if ($errors->any())
|
||||||
|
<x-flash-message type="danger" :messages="$errors->all()" />
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xl-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header d-flex align-items-center justify-content-between">
|
||||||
|
<h5 class="card-title mb-0">{{ $title }}</h5>
|
||||||
|
<a href="{{ route('event.create') }}" class="btn btn-primary waves-effect waves-light text-white"><i
|
||||||
|
class="ri-add-line align-middle"></i> Create</a>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
@php
|
||||||
|
$columns = [
|
||||||
|
[
|
||||||
|
'title' => 'S.N',
|
||||||
|
'data' => 'DT_RowIndex',
|
||||||
|
'name' => 'DT_RowIndex',
|
||||||
|
'orderable' => false,
|
||||||
|
'searchable' => false,
|
||||||
|
'sortable' => false,
|
||||||
|
],
|
||||||
|
['title' => 'Image', 'data' => 'image', 'name' => 'image'],
|
||||||
|
['title' => 'Title', 'data' => 'title', 'name' => 'title'],
|
||||||
|
['title' => 'Start Date', 'data' => 'start_date', 'name' => 'start_date'],
|
||||||
|
['title' => 'End Date', 'data' => 'end_date', 'name' => 'end_date'],
|
||||||
|
['title' => 'Slug', 'data' => 'slug', 'name' => 'slug'],
|
||||||
|
['title' => 'Status', 'data' => 'status', 'name' => 'status'],
|
||||||
|
[
|
||||||
|
'title' => 'Action',
|
||||||
|
'data' => 'action',
|
||||||
|
'orderable' => false,
|
||||||
|
'searchable' => false,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
@endphp
|
||||||
|
<x-data-table-script :route="route('event.index')" :reorder="route('event.reorder')" :columns="$columns" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
196
Modules/CCMS/resources/views/event/partials/_form.blade.php
Normal file
196
Modules/CCMS/resources/views/event/partials/_form.blade.php
Normal file
@@ -0,0 +1,196 @@
|
|||||||
|
<div class="row">
|
||||||
|
<div class="col-xl-8">
|
||||||
|
<div class="card h-auto">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row gy-3">
|
||||||
|
<div class="col-12">
|
||||||
|
{{ html()->label('Title')->class('form-label')->for('title') }}
|
||||||
|
{{ html()->span('*')->class('text-danger') }}
|
||||||
|
{{ html()->text('title')->class('form-control')->placeholder('Enter Event Title')->required(true) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
{{ html()->label('Start Date')->class('form-label') }}
|
||||||
|
<div class="input-group">
|
||||||
|
{{ html()->text('start_date')->class('form-control')->id('event-start-date')->placeholder('Event Start Date')->attributes([
|
||||||
|
'data-provider' => 'flatpickr',
|
||||||
|
'data-date-format' => 'Y-m-d',
|
||||||
|
'data-enable-time' => '',
|
||||||
|
])->required() }}
|
||||||
|
<span class="input-group-text"><i class="ri-calendar-event-line"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
{{ html()->label('End Date')->class('form-label') }}
|
||||||
|
<div class="input-group">
|
||||||
|
{{ html()->text('end_date')->class('form-control')->id('event-end-date')->placeholder('Event End Date')->attributes([
|
||||||
|
'data-provider' => 'flatpickr',
|
||||||
|
'data-date-format' => 'Y-m-d',
|
||||||
|
'data-enable-time' => '',
|
||||||
|
]) }}
|
||||||
|
<span class="input-group-text"><i class="ri-calendar-event-line"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12">
|
||||||
|
{{ html()->label('Description (Short)')->class('form-label')->for('short_description') }}
|
||||||
|
{{ html()->textarea('short_description')->class('form-control')->placeholder('Enter Description (Short)')->rows(5) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12">
|
||||||
|
{{ html()->label('Description')->class('form-label')->for('description') }}
|
||||||
|
{{ html()->textarea('description')->class('form-control ckeditor-classic')->placeholder('Enter Description') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<x-ccms::custom-form-field :data="$event->custom ?? []" />
|
||||||
|
|
||||||
|
<div class="card meta-section">
|
||||||
|
<div class="card-header">
|
||||||
|
<h6 class="card-title mb-0 fs-14">Meta</h6>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xl-12 col-sm-12">
|
||||||
|
{{ html()->label('Meta Title')->class('form-label')->for('meta_title') }}
|
||||||
|
{{ html()->text('meta_title')->class('form-control mb-3')->placeholder('Meta Title') }}
|
||||||
|
</div>
|
||||||
|
<div class="col-xl-12 col-sm-12">
|
||||||
|
{{ html()->label('Meta Keywords')->class('form-label')->for('meta_keywords') }}
|
||||||
|
{{ html()->textarea('meta_keywords')->class('form-control mb-3')->placeholder('Meta Keywords') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-xl-12 col-sm-12">
|
||||||
|
{{ html()->label('Meta Description')->class('form-label')->for('meta_description') }}
|
||||||
|
{{ html()->textarea('meta_description')->class('form-control mb-3')->placeholder('Meta wire:Description')->rows(3) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-xl-4">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h6 class="card-title mb-0 fs-14">
|
||||||
|
Published
|
||||||
|
</h6>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
{{ html()->label('Status')->class('form-label visually-hidden')->for('status') }}
|
||||||
|
{{ html()->select('status', config('constants.page_status_options'))->class('form-select choices-select') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<x-form-buttons :href="route('event.index')" :label="isset($event) ? 'Update' : 'Create'" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h6 class="card-title mb-0 fs-14">
|
||||||
|
Page Attributes
|
||||||
|
</h6>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
{{ html()->label('Parent Event')->class('form-label')->for('parent_id') }}
|
||||||
|
{{ html()->select('parent_id', $eventOptions ?? [])->value($event->parent_id ?? old('parent_id'))->class('form-select choices-select')->placeholder('Select') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card media-gallery-section">
|
||||||
|
<div class="card-header">
|
||||||
|
<h6 class="card-title mb-0 fs-14">
|
||||||
|
Icon
|
||||||
|
</h6>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="mb-3">
|
||||||
|
{{ html()->label('Icon')->class('form-label')->for('icon_class') }}
|
||||||
|
{{ html()->text('icon_class')->class('form-control')->placeholder('Icon class') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ html()->label('Icon Image')->class('form-label')->for('icon_image') }}
|
||||||
|
<x-image-input :data="$editable ? $event->getRawOriginal('icon_image') : null" id="icon_image" name="icon_image" :editable="$editable" :multiple=false />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="card featured-image-section">
|
||||||
|
<div class="card-header">
|
||||||
|
<h6 class="card-title mb-0 fs-14">
|
||||||
|
Featured Image
|
||||||
|
</h6>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="mb-3">
|
||||||
|
{{ html()->label('Featured')->class('form-label')->for('image') }}
|
||||||
|
<x-image-input :data="$editable ? $event->getRawOriginal('image') : null" id="image" name="image" :editable="$editable" :multiple=false />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ html()->label('Banner')->class('form-label')->for('banner') }}
|
||||||
|
<x-image-input :data="$editable ? $event->getRawOriginal('banner') : null" id="banner" name="banner" :editable="$editable" :multiple=false />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card media-gallery-section">
|
||||||
|
<div class="card-header">
|
||||||
|
<h6 class="card-title mb-0 fs-14">
|
||||||
|
Media Gallery
|
||||||
|
</h6>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<x-image-input :editable="$editable" id="images" name="images" :data="$editable ? $event->getRawOriginal('images') : null" :multiple="true"
|
||||||
|
label="Select Images" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card sidebar-section">
|
||||||
|
<div class="card-header d-flex jusitfy-content-between align-items-center">
|
||||||
|
<h6 class="card-title mb-0 fs-14">Sidebar</h6>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row gy-3">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
{{ html()->label('Title')->class('form-label')->for('sidebar_title') }}
|
||||||
|
{{ html()->text('sidebar_title')->class('form-control') }}
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-12">
|
||||||
|
{{ html()->label('Content')->class('form-label')->for('sidebar_content') }}
|
||||||
|
{{ html()->textarea('sidebar_content')->class('form-control')->placeholder('Short Content (optional)')->rows(3) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-12">
|
||||||
|
{{ html()->label('Image')->class('form-label')->for('sidebar_content') }}
|
||||||
|
<x-image-input :data="$editable ? $event->getRawOriginal('sidebar_image') : null" id="sidebar_image" name="sidebar_image" :editable="$editable"
|
||||||
|
:multiple=false />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card button-section">
|
||||||
|
<div class="card-header d-flex jusitfy-content-between align-items-center">
|
||||||
|
<h6 class="card-title mb-0 fs-14">Button</h6>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row gy-3">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
{{ html()->label('Text')->class('form-label')->for('button_text') }}
|
||||||
|
{{ html()->text('button_text')->class('form-control') }}
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-12">
|
||||||
|
{{ html()->label('Link')->class('form-label')->for('button_url') }}
|
||||||
|
{{ html()->text('button_url')->class('form-control')->placeholder('Button Link') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-12">
|
||||||
|
{{ html()->label('Target')->class('form-label')->for('button_target') }}
|
||||||
|
{{ html()->select('button_target', config('constants.redirect_options'))->class('form-select choices-select') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
14
Modules/CCMS/resources/views/franchise/create.blade.php
Normal file
14
Modules/CCMS/resources/views/franchise/create.blade.php
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
@section('content')
|
||||||
|
<div class="container-fluid">
|
||||||
|
|
||||||
|
<x-dashboard.breadcumb :title="$title" />
|
||||||
|
|
||||||
|
{{ html()->form('POST')->route('testimonial.store')->class(['needs-validation'])->attributes(['enctype' => 'multipart/form-data', 'novalidate'])->open() }}
|
||||||
|
|
||||||
|
@include('ccms::testimonial.partials._form')
|
||||||
|
|
||||||
|
{{ html()->form()->close() }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
@endsection
|
@@ -0,0 +1,10 @@
|
|||||||
|
<div class="hstack flex-wrap gap-3">
|
||||||
|
|
||||||
|
{{-- <a data-link="{{ route('franchise.markAsRead', $id) }}" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Mark as {{ $is_read == 1 ? 'unread' : 'read' }}" data-status="{{ $is_read == 1 ? 'read' : 'unread' }}" --}}
|
||||||
|
{{-- class="fs-15 mark-item"><i class="{{ $is_read == 1 ? ' ri-mail-close-line link-secondary' : ' ri-mail-check-line link-success' }}"></i></a> --}}
|
||||||
|
|
||||||
|
<a href="javascript:void(0);" data-link="{{ route('franchise.destroy', $id) }}" class="link-danger fs-15 remove-item" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Delete">
|
||||||
|
<i class="ri-delete-bin-6-line"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
14
Modules/CCMS/resources/views/franchise/edit.blade.php
Normal file
14
Modules/CCMS/resources/views/franchise/edit.blade.php
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
@section('content')
|
||||||
|
<div class="container-fluid">
|
||||||
|
|
||||||
|
<x-dashboard.breadcumb :title="$title" />
|
||||||
|
|
||||||
|
{{ html()->modelForm($testimonial, 'PUT')->route('testimonial.update', $testimonial->id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||||
|
|
||||||
|
@include('ccms::testimonial.partials._form')
|
||||||
|
|
||||||
|
{{ html()->form()->close() }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
@endsection
|
60
Modules/CCMS/resources/views/franchise/index.blade.php
Normal file
60
Modules/CCMS/resources/views/franchise/index.blade.php
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
@section('content')
|
||||||
|
<div class="container-fluid">
|
||||||
|
<x-dashboard.breadcumb :title="$title" />
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header align-items-center d-flex">
|
||||||
|
<h5 class="card-title flex-grow-1 mb-0">{{ $title }}</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
@php
|
||||||
|
$columns = [
|
||||||
|
[
|
||||||
|
'title' => '<input type="checkbox" id="select-all">',
|
||||||
|
'data' => 'checkbox',
|
||||||
|
'name' => 'checkbox',
|
||||||
|
'orderable' => false,
|
||||||
|
'searchable' => false,
|
||||||
|
'className' => 'align-middle',
|
||||||
|
'width' => '1%',
|
||||||
|
],
|
||||||
|
['title' => 'First Name', 'data' => 'first_name', 'name' => 'first_name'],
|
||||||
|
['title' => 'Last Name', 'data' => 'last_name', 'name' => 'first_name'],
|
||||||
|
['title' => 'Email', 'data' => 'email', 'name' => 'email'],
|
||||||
|
['title' => 'Phone', 'data' => 'phone', 'name' => 'phone'],
|
||||||
|
['title' => 'Address', 'data' => 'address', 'name' => 'address'],
|
||||||
|
['title' => 'City', 'data' => 'city', 'name' => 'city'],
|
||||||
|
['title' => 'State', 'data' => 'state', 'name' => 'state'],
|
||||||
|
['title' => 'Invest Level', 'data' => 'invest_level', 'name' => 'invest_level'],
|
||||||
|
[
|
||||||
|
'title' => 'Franchise Location',
|
||||||
|
'data' => 'franchise_location',
|
||||||
|
'name' => 'franchise_location',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'title' => 'Action',
|
||||||
|
'data' => 'action',
|
||||||
|
'orderable' => false,
|
||||||
|
'searchable' => false,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
@endphp
|
||||||
|
<x-data-table-script :route="route('franchise.index')" :reorder="null" :columns="$columns" />
|
||||||
|
</div>
|
||||||
|
<div class="card" id="customerList">
|
||||||
|
|
||||||
|
<div class="card-body p-2">
|
||||||
|
{{-- <div class="table-responsive">
|
||||||
|
{{ $dataTable->table(['class' => 'table table-sm w-100', 'data-is_enrolled' => $is_enrolled], true) }}
|
||||||
|
</div> --}}
|
||||||
|
|
||||||
|
<div class="row mt-3">
|
||||||
|
<div class="col-md-3">
|
||||||
|
{{ html()->select('action', [2 => 'Send News Letter', 3 => 'Send Mail'])->placeholder('Bulk Actions')->class('form-select bulk-select') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
@@ -0,0 +1,71 @@
|
|||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-8 col-xl-9">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row gy-3">
|
||||||
|
<div class="col-md-6">
|
||||||
|
{{ html()->label('Name')->class('form-label') }}
|
||||||
|
{{ html()->span('*')->class('text-danger') }}
|
||||||
|
{{ html()->text('title')->class('form-control')->placeholder('Enter Name')->required() }}
|
||||||
|
{{ html()->div('Name is required')->class('invalid-feedback') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
{{ html()->label('Designation')->class('form-label') }}
|
||||||
|
{{ html()->text('designation')->class('form-control')->placeholder('Enter Designation') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
{{ html()->label('Company')->class('form-label') }}
|
||||||
|
{{ html()->text('company')->class('form-control')->placeholder('Enter Company') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-6">
|
||||||
|
{{ html()->label('Branch')->class('form-label')->for('branch_id') }}
|
||||||
|
{{ html()->select('branch_id', $branchOptions)->class('form-select choices-select')->placeholder('Select') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12">
|
||||||
|
{{ html()->label('Comment')->class('form-label')->for('description') }}
|
||||||
|
{{ html()->span('*')->class('text-danger') }}
|
||||||
|
{{ html()->textarea('description')->class('form-control')->rows(10) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- end col -->
|
||||||
|
<div class="col-lg-4 col-xl-3">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="card-title mb-0">Publish</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
{{ html()->select('status', config('constants.page_status_options'))->class('form-select choices-select ') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- end card body -->
|
||||||
|
|
||||||
|
<x-form-buttons :editable="$editable" label="Save" href="{{ route('team.index') }}" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card featured-image-section">
|
||||||
|
<div class="card-header">
|
||||||
|
<h6 class="card-title mb-0 fs-14">
|
||||||
|
Featured
|
||||||
|
</h6>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="mb-3">
|
||||||
|
{{ html()->label('Image')->class('form-label')->for('image') }}
|
||||||
|
<x-image-input :editable="$editable" id="image" name="image" :data="$editable ? $testimonial->getRawOriginal('image') : null"
|
||||||
|
:multiple="false" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- end col -->
|
||||||
|
</div>
|
@@ -26,9 +26,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
{{ html()->label('Video Link')->for('slug') }}
|
{{ html()->label('Description')->for('slug') }}
|
||||||
{{ html()->text('link')->value($gallery->link ?? old('link'))->class('form-control')->placeholder('Enter Youtube video link') }}
|
{{ html()->text('link')->value($gallery->link ?? old('link'))->class('form-control')->placeholder('Enter Video Description') }}
|
||||||
<div class="d-flex flex-wrap mt-1" id="video-preview">
|
<div class="d-flex flex-wrap mt-1">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
14
Modules/CCMS/resources/views/newsletter/create.blade.php
Normal file
14
Modules/CCMS/resources/views/newsletter/create.blade.php
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
@section('content')
|
||||||
|
<div class="container-fluid">
|
||||||
|
|
||||||
|
<x-dashboard.breadcumb :title="$title" />
|
||||||
|
|
||||||
|
{{ html()->form('POST')->route('testimonial.store')->class(['needs-validation'])->attributes(['enctype' => 'multipart/form-data', 'novalidate'])->open() }}
|
||||||
|
|
||||||
|
@include('ccms::testimonial.partials._form')
|
||||||
|
|
||||||
|
{{ html()->form()->close() }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
@endsection
|
@@ -0,0 +1,8 @@
|
|||||||
|
<div class="hstack flex-wrap gap-3">
|
||||||
|
|
||||||
|
<a href="javascript:void(0);" data-link="{{ route('newsletter.destroy', $id) }}" class="link-danger fs-15 remove-item"
|
||||||
|
data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Delete">
|
||||||
|
<i class="ri-delete-bin-6-line"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
14
Modules/CCMS/resources/views/newsletter/edit.blade.php
Normal file
14
Modules/CCMS/resources/views/newsletter/edit.blade.php
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
@section('content')
|
||||||
|
<div class="container-fluid">
|
||||||
|
|
||||||
|
<x-dashboard.breadcumb :title="$title" />
|
||||||
|
|
||||||
|
{{ html()->modelForm($testimonial, 'PUT')->route('testimonial.update', $testimonial->id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||||
|
|
||||||
|
@include('ccms::testimonial.partials._form')
|
||||||
|
|
||||||
|
{{ html()->form()->close() }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
@endsection
|
48
Modules/CCMS/resources/views/newsletter/index.blade.php
Normal file
48
Modules/CCMS/resources/views/newsletter/index.blade.php
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
@section('content')
|
||||||
|
<div class="container-fluid">
|
||||||
|
<x-dashboard.breadcumb :title="$title" />
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header align-items-center d-flex">
|
||||||
|
<h5 class="card-title flex-grow-1 mb-0">{{ $title }}</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
@php
|
||||||
|
$columns = [
|
||||||
|
[
|
||||||
|
'title' => '<input type="checkbox" id="select-all">',
|
||||||
|
'data' => 'checkbox',
|
||||||
|
'name' => 'checkbox',
|
||||||
|
'orderable' => false,
|
||||||
|
'searchable' => false,
|
||||||
|
'className' => 'align-middle',
|
||||||
|
'width' => '1%',
|
||||||
|
],
|
||||||
|
['title' => 'Email', 'data' => 'email', 'name' => 'email'],
|
||||||
|
[
|
||||||
|
'title' => 'Action',
|
||||||
|
'data' => 'action',
|
||||||
|
'orderable' => false,
|
||||||
|
'searchable' => false,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
@endphp
|
||||||
|
<x-data-table-script :route="route('newsletter.index')" :reorder="null" :columns="$columns" />
|
||||||
|
</div>
|
||||||
|
<div class="card" id="customerList">
|
||||||
|
|
||||||
|
<div class="card-body p-2">
|
||||||
|
{{-- <div class="table-responsive">
|
||||||
|
{{ $dataTable->table(['class' => 'table table-sm w-100', 'data-is_enrolled' => $is_enrolled], true) }}
|
||||||
|
</div> --}}
|
||||||
|
|
||||||
|
<div class="row mt-3">
|
||||||
|
<div class="col-md-3">
|
||||||
|
{{ html()->select('action', [2 => 'Send News Letter', 3 => 'Send Mail'])->placeholder('Bulk Actions')->class('form-select bulk-select') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
@@ -0,0 +1,71 @@
|
|||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-8 col-xl-9">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row gy-3">
|
||||||
|
<div class="col-md-6">
|
||||||
|
{{ html()->label('Name')->class('form-label') }}
|
||||||
|
{{ html()->span('*')->class('text-danger') }}
|
||||||
|
{{ html()->text('title')->class('form-control')->placeholder('Enter Name')->required() }}
|
||||||
|
{{ html()->div('Name is required')->class('invalid-feedback') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
{{ html()->label('Designation')->class('form-label') }}
|
||||||
|
{{ html()->text('designation')->class('form-control')->placeholder('Enter Designation') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
{{ html()->label('Company')->class('form-label') }}
|
||||||
|
{{ html()->text('company')->class('form-control')->placeholder('Enter Company') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-6">
|
||||||
|
{{ html()->label('Branch')->class('form-label')->for('branch_id') }}
|
||||||
|
{{ html()->select('branch_id', $branchOptions)->class('form-select choices-select')->placeholder('Select') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12">
|
||||||
|
{{ html()->label('Comment')->class('form-label')->for('description') }}
|
||||||
|
{{ html()->span('*')->class('text-danger') }}
|
||||||
|
{{ html()->textarea('description')->class('form-control')->rows(10) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- end col -->
|
||||||
|
<div class="col-lg-4 col-xl-3">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="card-title mb-0">Publish</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
{{ html()->select('status', config('constants.page_status_options'))->class('form-select choices-select ') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- end card body -->
|
||||||
|
|
||||||
|
<x-form-buttons :editable="$editable" label="Save" href="{{ route('team.index') }}" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card featured-image-section">
|
||||||
|
<div class="card-header">
|
||||||
|
<h6 class="card-title mb-0 fs-14">
|
||||||
|
Featured
|
||||||
|
</h6>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="mb-3">
|
||||||
|
{{ html()->label('Image')->class('form-label')->for('image') }}
|
||||||
|
<x-image-input :editable="$editable" id="image" name="image" :data="$editable ? $testimonial->getRawOriginal('image') : null"
|
||||||
|
:multiple="false" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- end col -->
|
||||||
|
</div>
|
@@ -29,7 +29,7 @@
|
|||||||
],
|
],
|
||||||
['title' => 'Image', 'data' => 'image', 'name' => 'image'],
|
['title' => 'Image', 'data' => 'image', 'name' => 'image'],
|
||||||
['title' => 'Name', 'data' => 'title', 'name' => 'title'],
|
['title' => 'Name', 'data' => 'title', 'name' => 'title'],
|
||||||
['title' => 'Link', 'data' => 'link', 'name' => 'link'],
|
['title' => 'Link', 'data' => 'linka', 'name' => 'linka'],
|
||||||
['title' => 'Status', 'data' => 'status', 'name' => 'status'],
|
['title' => 'Status', 'data' => 'status', 'name' => 'status'],
|
||||||
[
|
[
|
||||||
'title' => 'Action',
|
'title' => 'Action',
|
||||||
|
@@ -0,0 +1,8 @@
|
|||||||
|
<div class="hstack flex-wrap gap-3">
|
||||||
|
|
||||||
|
<a href="javascript:void(0);" data-link="{{ route('vacancy.destroy', $id) }}" class="link-danger fs-15 remove-item"
|
||||||
|
data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Delete">
|
||||||
|
<i class="ri-delete-bin-6-line"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
52
Modules/CCMS/resources/views/vacancy/index.blade.php
Normal file
52
Modules/CCMS/resources/views/vacancy/index.blade.php
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
@section('content')
|
||||||
|
<div class="container-fluid">
|
||||||
|
<x-dashboard.breadcumb :title="$title" />
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header align-items-center d-flex">
|
||||||
|
<h5 class="card-title flex-grow-1 mb-0">{{ $title }}</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
@php
|
||||||
|
$columns = [
|
||||||
|
[
|
||||||
|
'title' => '<input type="checkbox" id="select-all">',
|
||||||
|
'data' => 'checkbox',
|
||||||
|
'name' => 'checkbox',
|
||||||
|
'orderable' => false,
|
||||||
|
'searchable' => false,
|
||||||
|
'className' => 'align-middle',
|
||||||
|
'width' => '1%',
|
||||||
|
],
|
||||||
|
['title' => 'First Name', 'data' => 'first_name', 'name' => 'first_name'],
|
||||||
|
['title' => 'Last Name', 'data' => 'last_name', 'name' => 'last_name'],
|
||||||
|
['title' => 'Email', 'data' => 'email', 'name' => 'email'],
|
||||||
|
['title' => 'Phone', 'data' => 'phone', 'name' => 'phone'],
|
||||||
|
['title' => 'Qualification', 'data' => 'qualification', 'name' => 'qualification'],
|
||||||
|
[
|
||||||
|
'title' => 'Action',
|
||||||
|
'data' => 'action',
|
||||||
|
'orderable' => false,
|
||||||
|
'searchable' => false,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
@endphp
|
||||||
|
<x-data-table-script :route="route('vacancy.index')" :reorder="null" :columns="$columns" />
|
||||||
|
</div>
|
||||||
|
<div class="card" id="customerList">
|
||||||
|
|
||||||
|
<div class="card-body p-2">
|
||||||
|
{{-- <div class="table-responsive">
|
||||||
|
{{ $dataTable->table(['class' => 'table table-sm w-100', 'data-is_enrolled' => $is_enrolled], true) }}
|
||||||
|
</div> --}}
|
||||||
|
|
||||||
|
<div class="row mt-3">
|
||||||
|
<div class="col-md-3">
|
||||||
|
{{ html()->select('action', [2 => 'Send News Letter', 3 => 'Send Mail'])->placeholder('Bulk Actions')->class('form-select bulk-select') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
@@ -0,0 +1,14 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
@section('content')
|
||||||
|
<div class="container-fluid">
|
||||||
|
|
||||||
|
<x-dashboard.breadcumb :title="$title" />
|
||||||
|
|
||||||
|
{{ html()->form('POST')->route('testimonial.store')->class(['needs-validation'])->attributes(['enctype' => 'multipart/form-data', 'novalidate'])->open() }}
|
||||||
|
|
||||||
|
@include('ccms::testimonial.partials._form')
|
||||||
|
|
||||||
|
{{ html()->form()->close() }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
@endsection
|
14
Modules/CCMS/resources/views/vacancy/partials/edit.blade.php
Normal file
14
Modules/CCMS/resources/views/vacancy/partials/edit.blade.php
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
@section('content')
|
||||||
|
<div class="container-fluid">
|
||||||
|
|
||||||
|
<x-dashboard.breadcumb :title="$title" />
|
||||||
|
|
||||||
|
{{ html()->modelForm($testimonial, 'PUT')->route('testimonial.update', $testimonial->id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||||
|
|
||||||
|
@include('ccms::testimonial.partials._form')
|
||||||
|
|
||||||
|
{{ html()->form()->close() }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
@endsection
|
@@ -3,16 +3,20 @@
|
|||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
use Modules\CCMS\Http\Controllers\BlogController;
|
use Modules\CCMS\Http\Controllers\BlogController;
|
||||||
use Modules\CCMS\Http\Controllers\BranchController;
|
use Modules\CCMS\Http\Controllers\BranchController;
|
||||||
|
use Modules\CCMS\Http\Controllers\CareerController;
|
||||||
use Modules\CCMS\Http\Controllers\CategoryController;
|
use Modules\CCMS\Http\Controllers\CategoryController;
|
||||||
use Modules\CCMS\Http\Controllers\CounselorController;
|
use Modules\CCMS\Http\Controllers\CounselorController;
|
||||||
use Modules\CCMS\Http\Controllers\CounterController;
|
use Modules\CCMS\Http\Controllers\CounterController;
|
||||||
use Modules\CCMS\Http\Controllers\CountryController;
|
use Modules\CCMS\Http\Controllers\CountryController;
|
||||||
use Modules\CCMS\Http\Controllers\EnquiryController;
|
use Modules\CCMS\Http\Controllers\EnquiryController;
|
||||||
|
use Modules\CCMS\Http\Controllers\EventController;
|
||||||
use Modules\CCMS\Http\Controllers\FaqCategoryController;
|
use Modules\CCMS\Http\Controllers\FaqCategoryController;
|
||||||
use Modules\CCMS\Http\Controllers\FaqController;
|
use Modules\CCMS\Http\Controllers\FaqController;
|
||||||
|
use Modules\CCMS\Http\Controllers\FranchiseController;
|
||||||
use Modules\CCMS\Http\Controllers\GalleryCategoryController;
|
use Modules\CCMS\Http\Controllers\GalleryCategoryController;
|
||||||
use Modules\CCMS\Http\Controllers\GalleryController;
|
use Modules\CCMS\Http\Controllers\GalleryController;
|
||||||
use Modules\CCMS\Http\Controllers\InstitutionController;
|
use Modules\CCMS\Http\Controllers\InstitutionController;
|
||||||
|
use Modules\CCMS\Http\Controllers\NewsletterController;
|
||||||
use Modules\CCMS\Http\Controllers\PageController;
|
use Modules\CCMS\Http\Controllers\PageController;
|
||||||
use Modules\CCMS\Http\Controllers\PartnerController;
|
use Modules\CCMS\Http\Controllers\PartnerController;
|
||||||
use Modules\CCMS\Http\Controllers\PopupController;
|
use Modules\CCMS\Http\Controllers\PopupController;
|
||||||
@@ -22,6 +26,7 @@ use Modules\CCMS\Http\Controllers\SliderController;
|
|||||||
use Modules\CCMS\Http\Controllers\TeamController;
|
use Modules\CCMS\Http\Controllers\TeamController;
|
||||||
use Modules\CCMS\Http\Controllers\TestController;
|
use Modules\CCMS\Http\Controllers\TestController;
|
||||||
use Modules\CCMS\Http\Controllers\TestimonialController;
|
use Modules\CCMS\Http\Controllers\TestimonialController;
|
||||||
|
use Modules\CCMS\Http\Controllers\VacancyController;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@@ -31,7 +36,7 @@ use Modules\CCMS\Http\Controllers\TestimonialController;
|
|||||||
| Here is where you can register web routes for your application. These
|
| Here is where you can register web routes for your application. These
|
||||||
| routes are loaded by the RouteServiceProvider within a group which
|
| routes are loaded by the RouteServiceProvider within a group which
|
||||||
| contains the "web" middleware group. Now create something great!
|
| contains the "web" middleware group. Now create something great!
|
||||||
|
|
|Eventcontr
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Route::group(['middleware' => ['web', 'auth', 'permission'], 'prefix' => 'admin/'], function () {
|
Route::group(['middleware' => ['web', 'auth', 'permission'], 'prefix' => 'admin/'], function () {
|
||||||
@@ -83,6 +88,14 @@ Route::group(['middleware' => ['web', 'auth', 'permission'], 'prefix' => 'admin/
|
|||||||
Route::get('service/toggle/{id}', [ServiceController::class, 'toggle'])->name('service.toggle');
|
Route::get('service/toggle/{id}', [ServiceController::class, 'toggle'])->name('service.toggle');
|
||||||
Route::resource('service', ServiceController::class)->names('service');
|
Route::resource('service', ServiceController::class)->names('service');
|
||||||
|
|
||||||
|
Route::post('event/reorder', [EventController::class, 'reorder'])->name('event.reorder');
|
||||||
|
Route::get('event/toggle/{id}', [EventController::class, 'toggle'])->name('event.toggle');
|
||||||
|
Route::resource('event', EventController::class)->names('event');
|
||||||
|
|
||||||
|
Route::post('career/reorder', [CareerController::class, 'reorder'])->name('career.reorder');
|
||||||
|
Route::get('career/toggle/{id}', [CareerController::class, 'toggle'])->name('career.toggle');
|
||||||
|
Route::resource('career', CareerController::class)->names('career');
|
||||||
|
|
||||||
Route::post('branch/reorder', [BranchController::class, 'reorder'])->name('branch.reorder');
|
Route::post('branch/reorder', [BranchController::class, 'reorder'])->name('branch.reorder');
|
||||||
Route::get('branch/toggle/{id}', [BranchController::class, 'toggle'])->name('branch.toggle');
|
Route::get('branch/toggle/{id}', [BranchController::class, 'toggle'])->name('branch.toggle');
|
||||||
Route::resource('branch', BranchController::class)->names('branch');
|
Route::resource('branch', BranchController::class)->names('branch');
|
||||||
@@ -121,8 +134,13 @@ Route::group(['middleware' => ['web', 'auth', 'permission'], 'prefix' => 'admin/
|
|||||||
Route::get('institution/toggle/{id}', [InstitutionController::class, 'toggle'])->name('institution.toggle');
|
Route::get('institution/toggle/{id}', [InstitutionController::class, 'toggle'])->name('institution.toggle');
|
||||||
Route::resource('institution', InstitutionController::class)->names('institution')->only(['store', 'edit', 'destroy']);
|
Route::resource('institution', InstitutionController::class)->names('institution')->only(['store', 'edit', 'destroy']);
|
||||||
|
|
||||||
|
Route::post('/enquiry/bulk-action', [EnquiryController::class, 'bulkAction'])->name('enquiry.bulkAction');
|
||||||
Route::get('enquiry/mark-as-read/{id}', [EnquiryController::class, 'markAsRead'])->name('enquiry.markAsRead');
|
Route::get('enquiry/mark-as-read/{id}', [EnquiryController::class, 'markAsRead'])->name('enquiry.markAsRead');
|
||||||
Route::resource('enquiry', EnquiryController::class)->names('enquiry')->only(['index', 'store', 'destroy']);
|
Route::resource('enquiry', EnquiryController::class)->names('enquiry')->only(['index', 'store', 'destroy']);
|
||||||
|
|
||||||
|
Route::resource('franchise', FranchiseController::class)->names('franchise')->only(['index', 'store', 'destroy']);
|
||||||
|
Route::resource('newsletter', NewsletterController::class)->names('newsletter')->only(['index', 'store', 'destroy']);
|
||||||
|
Route::resource('vacancy', VacancyController::class)->names('vacancy')->only(['index', 'store', 'destroy']);
|
||||||
|
|
||||||
Route::resource('counselor', CounselorController::class)->names('counselor')->only(['index', 'store', 'destroy']);
|
Route::resource('counselor', CounselorController::class)->names('counselor')->only(['index', 'store', 'destroy']);
|
||||||
});
|
});
|
||||||
|
0
Modules/Chatbot/app/Http/Controllers/.gitkeep
Normal file
0
Modules/Chatbot/app/Http/Controllers/.gitkeep
Normal file
249
Modules/Chatbot/app/Http/Controllers/ChatbotController.php
Normal file
249
Modules/Chatbot/app/Http/Controllers/ChatbotController.php
Normal file
@@ -0,0 +1,249 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Chatbot\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Http;
|
||||||
|
use Illuminate\Http\Client\ConnectionException;
|
||||||
|
use Illuminate\Http\Client\RequestException;
|
||||||
|
|
||||||
|
class ChatbotController extends Controller
|
||||||
|
{
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
return view('chatbot::index');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
return view('chatbot::create');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
public function show($id)
|
||||||
|
{
|
||||||
|
return view('chatbot::show');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
return view('chatbot::edit');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update(Request $request, $id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
public function destroy($id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
public function queryold(Request $request)
|
||||||
|
{
|
||||||
|
$message = $request->input('message');
|
||||||
|
return response()->json(['reply' => 'You said: ' . $message]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// public function query(Request $request)
|
||||||
|
// {
|
||||||
|
// $request->validate([
|
||||||
|
// 'message' => 'required|string'
|
||||||
|
// ]);
|
||||||
|
|
||||||
|
// // 1) Pull the current contact details from settings
|
||||||
|
// $phone = setting('phone'); // e.g. "5344710"
|
||||||
|
// $email = setting('email'); // e.g. "info@rohini.edu.np"
|
||||||
|
// $address = setting('address'); // e.g. "House #160, Adwait Marg, Putalisadak, Kathmandu, Nepal"
|
||||||
|
// $facebook = setting('facebook'); // if you have this
|
||||||
|
// $whatsapp = setting('whatsapp'); // if you have this
|
||||||
|
|
||||||
|
// $userMessage = trim($request->message);
|
||||||
|
|
||||||
|
// // 2) Build a system prompt that *includes* your real contact info
|
||||||
|
// $systemContents = <<<EOT
|
||||||
|
// You are an assistant for Rohini International Education Services in Nepal.
|
||||||
|
// Use *only* the following facts when answering:
|
||||||
|
|
||||||
|
// • Website: https://rohini.edu.np/
|
||||||
|
// • Phone: {$phone}
|
||||||
|
// • Email: {$email}
|
||||||
|
// • Address: {$address}
|
||||||
|
// EOT;
|
||||||
|
|
||||||
|
// // 3) Prepare the message payload
|
||||||
|
// $messages = [
|
||||||
|
// ['role' => 'system', 'content' => $systemContents],
|
||||||
|
// ['role' => 'user', 'content' => $userMessage],
|
||||||
|
// ];
|
||||||
|
|
||||||
|
// // 4) Call the AI as before
|
||||||
|
// try {
|
||||||
|
// $response = Http::timeout(60)
|
||||||
|
// ->retry(2, 100)
|
||||||
|
// ->withToken(config('services.openrouter.key'))
|
||||||
|
// ->post('https://openrouter.ai/api/v1/chat/completions', [
|
||||||
|
// 'model' => 'deepseek/deepseek-r1:free',
|
||||||
|
// 'messages' => $messages,
|
||||||
|
// ]);
|
||||||
|
|
||||||
|
// $response->throw();
|
||||||
|
|
||||||
|
// // 5) Return exactly what the AI gave, knowing the system prompt constrained it
|
||||||
|
// return response()->json([
|
||||||
|
// 'reply' => $response->json('choices.0.message.content') ?? 'No response from assistant.'
|
||||||
|
// ]);
|
||||||
|
// } catch (ConnectionException $e) {
|
||||||
|
// return response()->json([
|
||||||
|
// 'reply' => 'Sorry, I could not connect to the AI service. Please try again later.'
|
||||||
|
// ], 504);
|
||||||
|
// } catch (RequestException $e) {
|
||||||
|
// $msg = $e->response->json('error.message') ?? $e->getMessage();
|
||||||
|
// return response()->json([
|
||||||
|
// 'reply' => 'Sorry, an error occurred. Please try again later.',
|
||||||
|
// 'error' => $msg
|
||||||
|
// ], 500);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
public function query(Request $request)
|
||||||
|
{
|
||||||
|
$request->validate([
|
||||||
|
'message' => 'required|string'
|
||||||
|
]);
|
||||||
|
|
||||||
|
// 1) Pull the current contact details from your settings/config
|
||||||
|
$phone = setting('phone'); // e.g. "+977 1-5344710"
|
||||||
|
$email = setting('email'); // e.g. "info@rohini.edu.np"
|
||||||
|
$address = setting('address'); // e.g. "House #160, Adait Marg, Kathmandu, Nepal"
|
||||||
|
$whatsapp = setting('whatsapp');
|
||||||
|
$instagram = setting('instagram');
|
||||||
|
$location = setting('location');
|
||||||
|
$youtube = setting('youtube');
|
||||||
|
$tiktok = setting('tiktok');
|
||||||
|
$userMessage = strtolower(trim($request->message));
|
||||||
|
|
||||||
|
$contactInfo = "\n\nPlease contact us for more information. Visit <a href=\"https://rohini.edu.np/\" target=\"_blank\">https://rohini.edu.np/</a> or call us on " . $phone . ".";
|
||||||
|
|
||||||
|
$allowedPrompts = [
|
||||||
|
'hi' => 'Hello! How can I assist you with your study abroad plans today?',
|
||||||
|
|
||||||
|
'what is rohini international education services?' =>
|
||||||
|
'Rohini International Education Services is a Nepal-based consultancy specializing in guiding students who want to study in New Zealand. Visit https://rohini.edu.np/ for more details.',
|
||||||
|
|
||||||
|
'where is rohini international located?' =>
|
||||||
|
'Our Kathmandu office is at ' . $address . '.',
|
||||||
|
|
||||||
|
'how can i contact support?' =>
|
||||||
|
'You can call us at ' . $phone . ', email us at ' . $email .
|
||||||
|
', or message us on WhatsApp at ' . $whatsapp . '. We are available Sunday to Friday, 09:00 AM to 05:00 PM.',
|
||||||
|
|
||||||
|
'what services do you provide?' =>
|
||||||
|
'We provide counseling, university and course selection, visa application support, documentation help, pre-departure briefings, financial and scholarship guidance, and accommodation support for students going to New Zealand.',
|
||||||
|
|
||||||
|
'do you offer test preparation?' =>
|
||||||
|
'Yes, we offer IELTS and PTE test preparation classes with experienced instructors and flexible schedules.',
|
||||||
|
|
||||||
|
'why choose new zealand for higher education?' =>
|
||||||
|
'New Zealand offers globally recognized qualifications, high-quality education, a safe environment, and post-study work opportunities.',
|
||||||
|
|
||||||
|
'what is the process to apply to study in new zealand?' =>
|
||||||
|
'We guide students through selecting a course, checking eligibility, gathering documents, applying for a visa, and preparing for departure.',
|
||||||
|
|
||||||
|
'are there work opportunities in new zealand for students?' =>
|
||||||
|
'Yes, students can work part-time during study, full-time during holidays, and apply for post-study work visas after graduation.',
|
||||||
|
|
||||||
|
'what accommodation options are available in new zealand?' =>
|
||||||
|
'Students can choose from shared flats, homestays, hostels, or on-campus housing. We help you find the right option.',
|
||||||
|
|
||||||
|
'do you support nepalese students in new zealand?' =>
|
||||||
|
'Absolutely! We provide full pre-departure briefings and continuous support to ensure students feel at home in New Zealand.',
|
||||||
|
|
||||||
|
'rohini' =>
|
||||||
|
'Rohini International Education Services is a Nepal-based consultancy located in Kathmandu, specializing in guiding students who want to study in New Zealand. Visit https://rohini.edu.np/ for full information.',
|
||||||
|
|
||||||
|
'location' =>
|
||||||
|
'Our main office is at ' . $address . '. We also have branches in Birtamode, Birgunj, Damak, Chitwan, and Pokhara.',
|
||||||
|
|
||||||
|
'contact' =>
|
||||||
|
'You can call us at ' . $phone . ', email us at ' . $email .
|
||||||
|
', or message us on WhatsApp at ' . $whatsapp . '. We’re available Sunday to Friday, 09:00 AM to 05:00 PM.',
|
||||||
|
|
||||||
|
'services' =>
|
||||||
|
'We provide counseling, university and course selection, visa application support, documentation help, pre-departure briefings, financial and scholarship guidance, and accommodation support for students going to New Zealand.',
|
||||||
|
|
||||||
|
'social media' =>
|
||||||
|
'Follow us on Instagram: ' . $instagram . ', YouTube: ' . $youtube . ', TikTok: ' . $tiktok . '.',
|
||||||
|
];
|
||||||
|
if (array_key_exists($userMessage, $allowedPrompts)) {
|
||||||
|
return response()->json([
|
||||||
|
'reply' => $allowedPrompts[$userMessage] . $contactInfo
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (str_contains($userMessage, 'location') || str_contains($userMessage, 'located')) {
|
||||||
|
return response()->json([
|
||||||
|
'reply' => $allowedPrompts['where is rohini international located?'] . $contactInfo
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (str_contains($userMessage, 'contact') || str_contains($userMessage, 'support')) {
|
||||||
|
return response()->json([
|
||||||
|
'reply' => $allowedPrompts['how can i contact support?'] . $contactInfo
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (str_contains($userMessage, 'service') || str_contains($userMessage, 'services')) {
|
||||||
|
return response()->json([
|
||||||
|
'reply' => $allowedPrompts['what services do you provide?'] . $contactInfo
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($allowedPrompts as $prompt => $answer) {
|
||||||
|
similar_text($userMessage, $prompt, $percent);
|
||||||
|
if ($percent > 80) {
|
||||||
|
return response()->json([
|
||||||
|
'reply' => "Did you mean: \"$prompt\"?\n" . $answer . $contactInfo
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
$response = Http::timeout(60)
|
||||||
|
->retry(2, 100)
|
||||||
|
->withToken(config('services.openrouter.key'))
|
||||||
|
->post('https://openrouter.ai/api/v1/chat/completions', [
|
||||||
|
'model' => 'deepseek/deepseek-r1:free',
|
||||||
|
'messages' => [
|
||||||
|
[
|
||||||
|
'role' => 'system',
|
||||||
|
'content' => 'You are an assistant for Rohini International Education Services in Nepal. Answer ONLY using information found on https://rohini.edu.np/. If the question is not related to this organization or its services for studying in New Zealand, reply with: "Sorry, I can only answer questions related to Rohini International Education Services and studying in New Zealand."'
|
||||||
|
],
|
||||||
|
['role' => 'user', 'content' => $request->message],
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
|
||||||
|
$response->throw();
|
||||||
|
|
||||||
|
return response()->json([
|
||||||
|
'reply' => ($response->json('choices.0.message.content') ?? 'No response from assistant.') . $contactInfo
|
||||||
|
]);
|
||||||
|
} catch (ConnectionException $e) {
|
||||||
|
return response()->json([
|
||||||
|
'reply' => 'Sorry, I could not connect to the AI service. Please try again later.' . $contactInfo
|
||||||
|
], 504);
|
||||||
|
} catch (RequestException $e) {
|
||||||
|
$msg = $e->response->json('error.message') ?? $e->getMessage();
|
||||||
|
return response()->json([
|
||||||
|
'reply' => 'Sorry, an error occurred. Please try again later.' . $contactInfo,
|
||||||
|
'error' => $msg
|
||||||
|
], 500);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
0
Modules/Chatbot/app/Models/Scopes/.gitkeep
Normal file
0
Modules/Chatbot/app/Models/Scopes/.gitkeep
Normal file
0
Modules/Chatbot/app/Providers/.gitkeep
Normal file
0
Modules/Chatbot/app/Providers/.gitkeep
Normal file
135
Modules/Chatbot/app/Providers/ChatbotServiceProvider.php
Normal file
135
Modules/Chatbot/app/Providers/ChatbotServiceProvider.php
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Chatbot\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Blade;
|
||||||
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
use Nwidart\Modules\Traits\PathNamespace;
|
||||||
|
use RecursiveDirectoryIterator;
|
||||||
|
use RecursiveIteratorIterator;
|
||||||
|
|
||||||
|
class ChatbotServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
use PathNamespace;
|
||||||
|
|
||||||
|
protected string $name = 'Chatbot';
|
||||||
|
|
||||||
|
protected string $nameLower = 'chatbot';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Boot the application events.
|
||||||
|
*/
|
||||||
|
public function boot(): void
|
||||||
|
{
|
||||||
|
$this->registerCommands();
|
||||||
|
$this->registerCommandSchedules();
|
||||||
|
$this->registerTranslations();
|
||||||
|
$this->registerConfig();
|
||||||
|
$this->registerViews();
|
||||||
|
$this->loadMigrationsFrom(module_path($this->name, 'database/migrations'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register the service provider.
|
||||||
|
*/
|
||||||
|
public function register(): void
|
||||||
|
{
|
||||||
|
$this->app->register(EventServiceProvider::class);
|
||||||
|
$this->app->register(RouteServiceProvider::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register commands in the format of Command::class
|
||||||
|
*/
|
||||||
|
protected function registerCommands(): void
|
||||||
|
{
|
||||||
|
// $this->commands([]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register command Schedules.
|
||||||
|
*/
|
||||||
|
protected function registerCommandSchedules(): void
|
||||||
|
{
|
||||||
|
// $this->app->booted(function () {
|
||||||
|
// $schedule = $this->app->make(Schedule::class);
|
||||||
|
// $schedule->command('inspire')->hourly();
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register translations.
|
||||||
|
*/
|
||||||
|
public function registerTranslations(): void
|
||||||
|
{
|
||||||
|
$langPath = resource_path('lang/modules/'.$this->nameLower);
|
||||||
|
|
||||||
|
if (is_dir($langPath)) {
|
||||||
|
$this->loadTranslationsFrom($langPath, $this->nameLower);
|
||||||
|
$this->loadJsonTranslationsFrom($langPath);
|
||||||
|
} else {
|
||||||
|
$this->loadTranslationsFrom(module_path($this->name, 'lang'), $this->nameLower);
|
||||||
|
$this->loadJsonTranslationsFrom(module_path($this->name, 'lang'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register config.
|
||||||
|
*/
|
||||||
|
protected function registerConfig(): void
|
||||||
|
{
|
||||||
|
$relativeConfigPath = config('modules.paths.generator.config.path');
|
||||||
|
$configPath = module_path($this->name, $relativeConfigPath);
|
||||||
|
|
||||||
|
if (is_dir($configPath)) {
|
||||||
|
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($configPath));
|
||||||
|
|
||||||
|
foreach ($iterator as $file) {
|
||||||
|
if ($file->isFile() && $file->getExtension() === 'php') {
|
||||||
|
$relativePath = str_replace($configPath . DIRECTORY_SEPARATOR, '', $file->getPathname());
|
||||||
|
$configKey = $this->nameLower . '.' . str_replace([DIRECTORY_SEPARATOR, '.php'], ['.', ''], $relativePath);
|
||||||
|
$key = ($relativePath === 'config.php') ? $this->nameLower : $configKey;
|
||||||
|
|
||||||
|
$this->publishes([$file->getPathname() => config_path($relativePath)], 'config');
|
||||||
|
$this->mergeConfigFrom($file->getPathname(), $key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register views.
|
||||||
|
*/
|
||||||
|
public function registerViews(): void
|
||||||
|
{
|
||||||
|
$viewPath = resource_path('views/modules/'.$this->nameLower);
|
||||||
|
$sourcePath = module_path($this->name, 'resources/views');
|
||||||
|
|
||||||
|
$this->publishes([$sourcePath => $viewPath], ['views', $this->nameLower.'-module-views']);
|
||||||
|
|
||||||
|
$this->loadViewsFrom(array_merge($this->getPublishableViewPaths(), [$sourcePath]), $this->nameLower);
|
||||||
|
|
||||||
|
$componentNamespace = $this->module_namespace($this->name, $this->app_path(config('modules.paths.generator.component-class.path')));
|
||||||
|
Blade::componentNamespace($componentNamespace, $this->nameLower);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the services provided by the provider.
|
||||||
|
*/
|
||||||
|
public function provides(): array
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getPublishableViewPaths(): array
|
||||||
|
{
|
||||||
|
$paths = [];
|
||||||
|
foreach (config('view.paths') as $path) {
|
||||||
|
if (is_dir($path.'/modules/'.$this->nameLower)) {
|
||||||
|
$paths[] = $path.'/modules/'.$this->nameLower;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $paths;
|
||||||
|
}
|
||||||
|
}
|
30
Modules/Chatbot/app/Providers/EventServiceProvider.php
Normal file
30
Modules/Chatbot/app/Providers/EventServiceProvider.php
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Chatbot\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||||
|
|
||||||
|
class EventServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The event handler mappings for the application.
|
||||||
|
*
|
||||||
|
* @var array<string, array<int, string>>
|
||||||
|
*/
|
||||||
|
protected $listen = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates if events should be discovered.
|
||||||
|
*
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
protected static $shouldDiscoverEvents = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configure the proper event listeners for email verification.
|
||||||
|
*/
|
||||||
|
protected function configureEmailVerification(): void
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
50
Modules/Chatbot/app/Providers/RouteServiceProvider.php
Normal file
50
Modules/Chatbot/app/Providers/RouteServiceProvider.php
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Chatbot\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Route;
|
||||||
|
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||||
|
|
||||||
|
class RouteServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
protected string $name = 'Chatbot';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called before routes are registered.
|
||||||
|
*
|
||||||
|
* Register any model bindings or pattern based filters.
|
||||||
|
*/
|
||||||
|
public function boot(): void
|
||||||
|
{
|
||||||
|
parent::boot();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define the routes for the application.
|
||||||
|
*/
|
||||||
|
public function map(): void
|
||||||
|
{
|
||||||
|
$this->mapApiRoutes();
|
||||||
|
$this->mapWebRoutes();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define the "web" routes for the application.
|
||||||
|
*
|
||||||
|
* These routes all receive session state, CSRF protection, etc.
|
||||||
|
*/
|
||||||
|
protected function mapWebRoutes(): void
|
||||||
|
{
|
||||||
|
Route::middleware('web')->group(module_path($this->name, '/routes/web.php'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define the "api" routes for the application.
|
||||||
|
*
|
||||||
|
* These routes are typically stateless.
|
||||||
|
*/
|
||||||
|
protected function mapApiRoutes(): void
|
||||||
|
{
|
||||||
|
Route::middleware('api')->prefix('api')->name('api.')->group(module_path($this->name, '/routes/api.php'));
|
||||||
|
}
|
||||||
|
}
|
0
Modules/Chatbot/app/Services/.gitkeep
Normal file
0
Modules/Chatbot/app/Services/.gitkeep
Normal file
30
Modules/Chatbot/composer.json
Normal file
30
Modules/Chatbot/composer.json
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"name": "nwidart/chatbot",
|
||||||
|
"description": "",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nicolas Widart",
|
||||||
|
"email": "n.widart@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"providers": [],
|
||||||
|
"aliases": {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Modules\\Chatbot\\": "app/",
|
||||||
|
"Modules\\Chatbot\\Database\\Factories\\": "database/factories/",
|
||||||
|
"Modules\\Chatbot\\Database\\Seeders\\": "database/seeders/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload-dev": {
|
||||||
|
"psr-4": {
|
||||||
|
"Modules\\Chatbot\\Tests\\": "tests/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
0
Modules/Chatbot/config/.gitkeep
Normal file
0
Modules/Chatbot/config/.gitkeep
Normal file
5
Modules/Chatbot/config/config.php
Normal file
5
Modules/Chatbot/config/config.php
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'name' => 'Chatbot',
|
||||||
|
];
|
0
Modules/Chatbot/database/factories/.gitkeep
Normal file
0
Modules/Chatbot/database/factories/.gitkeep
Normal file
0
Modules/Chatbot/database/migrations/.gitkeep
Normal file
0
Modules/Chatbot/database/migrations/.gitkeep
Normal file
0
Modules/Chatbot/database/seeders/.gitkeep
Normal file
0
Modules/Chatbot/database/seeders/.gitkeep
Normal file
16
Modules/Chatbot/database/seeders/ChatbotDatabaseSeeder.php
Normal file
16
Modules/Chatbot/database/seeders/ChatbotDatabaseSeeder.php
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Chatbot\Database\Seeders;
|
||||||
|
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
|
||||||
|
class ChatbotDatabaseSeeder extends Seeder
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the database seeds.
|
||||||
|
*/
|
||||||
|
public function run(): void
|
||||||
|
{
|
||||||
|
// $this->call([]);
|
||||||
|
}
|
||||||
|
}
|
11
Modules/Chatbot/module.json
Normal file
11
Modules/Chatbot/module.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"name": "Chatbot",
|
||||||
|
"alias": "chatbot",
|
||||||
|
"description": "",
|
||||||
|
"keywords": [],
|
||||||
|
"priority": 0,
|
||||||
|
"providers": [
|
||||||
|
"Modules\\Chatbot\\Providers\\ChatbotServiceProvider"
|
||||||
|
],
|
||||||
|
"files": []
|
||||||
|
}
|
15
Modules/Chatbot/package.json
Normal file
15
Modules/Chatbot/package.json
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "vite",
|
||||||
|
"build": "vite build"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"axios": "^1.1.2",
|
||||||
|
"laravel-vite-plugin": "^0.7.5",
|
||||||
|
"sass": "^1.69.5",
|
||||||
|
"postcss": "^8.3.7",
|
||||||
|
"vite": "^4.0.0"
|
||||||
|
}
|
||||||
|
}
|
18
Modules/Chatbot/readme.md
Normal file
18
Modules/Chatbot/readme.md
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
inside config/services.php
|
||||||
|
|
||||||
|
add
|
||||||
|
'openrouter' => [
|
||||||
|
'api_key' => env('OPENROUTER_API_KEY'),
|
||||||
|
'base_url' => 'https://openrouter.ai/api/v1/chat/completions',
|
||||||
|
],
|
||||||
|
|
||||||
|
----------------OR--------------------------
|
||||||
|
|
||||||
|
'openrouter' => [
|
||||||
|
'key' => env('OPENROUTER_API_KEY'),
|
||||||
|
],
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
add to your .env
|
||||||
|
|
||||||
|
OPENROUTER_API_KEY=your_api_key
|
120
Modules/Chatbot/resources/assets/css/chatbot.css
Normal file
120
Modules/Chatbot/resources/assets/css/chatbot.css
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
/* Message Styling */
|
||||||
|
.message {
|
||||||
|
padding: 8px;
|
||||||
|
margin: 5px 0;
|
||||||
|
border-radius: 10px;
|
||||||
|
max-width: 100%;
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* User Message (Blue with transparency) */
|
||||||
|
.user-message {
|
||||||
|
background-color: rgba(0, 123, 255, 0.2); /* Blue with 70% opacity */
|
||||||
|
color: black;
|
||||||
|
text-align: right;
|
||||||
|
align-self: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Bot Message (vz-primary with transparency) */
|
||||||
|
.bot-message {
|
||||||
|
background-color: rgba(var(--vz-primary-rgb), 0.2); /* Assuming var(--vz-primary-rgb) holds RGB value */
|
||||||
|
color: black;
|
||||||
|
text-align: left;
|
||||||
|
align-self: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Floating Chatbot Button */
|
||||||
|
#chatbot-toggle {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 45px;
|
||||||
|
right: 38px;
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
background-color: var(--vz-primary); /* Using CSS variable */
|
||||||
|
color: white;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 24px;
|
||||||
|
cursor: pointer;
|
||||||
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
||||||
|
transition: all 0.3s ease-in-out;
|
||||||
|
z-index: 1000; /* Ensure it's above other elements */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Chatbot Container */
|
||||||
|
#chatbot-container {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 42px;
|
||||||
|
right: 32px;
|
||||||
|
width: 320px;
|
||||||
|
background: white;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
display: none;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
z-index: 1000; /* Ensure it floats above the content */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Chatbot Header */
|
||||||
|
#chatbot-header {
|
||||||
|
background-color: var(--vz-primary);
|
||||||
|
color: white;
|
||||||
|
padding: 10px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 16px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Close Button */
|
||||||
|
#chatbot-close {
|
||||||
|
font-size: 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Chatbot Body */
|
||||||
|
#chatbot-body {
|
||||||
|
height: 250px;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Input and Send Button Styling */
|
||||||
|
#chatbot-input-container {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 10px;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#chatbot-input {
|
||||||
|
width: 100%;
|
||||||
|
padding: 10px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 20px;
|
||||||
|
outline: none;
|
||||||
|
font-size: 14px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
#chatbot-send {
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
background-color: transparent;
|
||||||
|
border: none;
|
||||||
|
color: var(--vz-primary);
|
||||||
|
font-size: 18px;
|
||||||
|
cursor: pointer;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
0
Modules/Chatbot/resources/assets/js/app.js
Normal file
0
Modules/Chatbot/resources/assets/js/app.js
Normal file
47
Modules/Chatbot/resources/assets/js/chatbot.js
Normal file
47
Modules/Chatbot/resources/assets/js/chatbot.js
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
$(document).ready(function() {
|
||||||
|
// Toggle chatbot visibility
|
||||||
|
$('#chatbot-toggle').click(function() {
|
||||||
|
$('#chatbot-container').fadeIn();
|
||||||
|
$('#chatbot-toggle').hide();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Close chatbot
|
||||||
|
$('#chatbot-close').click(function() {
|
||||||
|
$('#chatbot-container').fadeOut();
|
||||||
|
$('#chatbot-toggle').show();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Send message on button click
|
||||||
|
$('#chatbot-send').click(function() {
|
||||||
|
sendMessage();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Send message on "Enter" key
|
||||||
|
$('#chatbot-input').keypress(function(e) {
|
||||||
|
if (e.which == 13) {
|
||||||
|
sendMessage();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function sendMessage() {
|
||||||
|
var message = $('#chatbot-input').val().trim();
|
||||||
|
if (message === '') return;
|
||||||
|
|
||||||
|
$('#chatbot-body').append('<div class="message user-message"><strong>You:</strong> ' + message + '</div>');
|
||||||
|
$('#chatbot-input').val('');
|
||||||
|
$('#chatbot-body').scrollTop($('#chatbot-body')[0].scrollHeight);
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: '{{ route('chatbot.query') }}',
|
||||||
|
type: 'POST',
|
||||||
|
data: { message: message, _token: '{{ csrf_token() }}' },
|
||||||
|
success: function(response) {
|
||||||
|
$('#chatbot-body').append('<div class="message bot-message"><strong>Bot:</strong> ' + response.reply + '</div>');
|
||||||
|
$('#chatbot-body').scrollTop($('#chatbot-body')[0].scrollHeight);
|
||||||
|
},
|
||||||
|
error: function() {
|
||||||
|
$('#chatbot-body').append('<div class="message bot-message"><strong>Bot:</strong> Sorry, something went wrong.</div>');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
0
Modules/Chatbot/resources/assets/sass/app.scss
Normal file
0
Modules/Chatbot/resources/assets/sass/app.scss
Normal file
0
Modules/Chatbot/resources/views/.gitkeep
Normal file
0
Modules/Chatbot/resources/views/.gitkeep
Normal file
445
Modules/Chatbot/resources/views/chatbot.blade.php
Normal file
445
Modules/Chatbot/resources/views/chatbot.blade.php
Normal file
@@ -0,0 +1,445 @@
|
|||||||
|
@push('css')
|
||||||
|
<style>
|
||||||
|
/* Message Styling */
|
||||||
|
.message {
|
||||||
|
padding: 8px;
|
||||||
|
margin: 5px 0;
|
||||||
|
border-radius: 10px;
|
||||||
|
max-width: 100%;
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* User Message (Blue with transparency) */
|
||||||
|
.user-message {
|
||||||
|
background-color: rgba(0, 123, 255, 0.2);
|
||||||
|
/* Blue with 70% opacity */
|
||||||
|
color: black;
|
||||||
|
text-align: right;
|
||||||
|
align-self: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Bot Message (vz-primary with transparency) */
|
||||||
|
.bot-message {
|
||||||
|
background-color: rgba(var(--vz-primary-rgb), 0.2);
|
||||||
|
/* Assuming var(--vz-primary-rgb) holds RGB value */
|
||||||
|
color: black;
|
||||||
|
text-align: left;
|
||||||
|
align-self: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Floating Chatbot Button */
|
||||||
|
#chatbot-toggle {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 45px;
|
||||||
|
right: 38px;
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
background-color: var(--vz-primary);
|
||||||
|
/* Using CSS variable */
|
||||||
|
color: white;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 24px;
|
||||||
|
cursor: pointer;
|
||||||
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
||||||
|
transition: all 0.3s ease-in-out;
|
||||||
|
z-index: 1000;
|
||||||
|
/* Ensure it's above other elements */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Chatbot Container */
|
||||||
|
#chatbot-container {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 42px;
|
||||||
|
right: 36px;
|
||||||
|
width: 320px;
|
||||||
|
padding: 0px;
|
||||||
|
background: white;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
display: none;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
z-index: 1000;
|
||||||
|
/* Ensure it floats above the content */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Chatbot Header */
|
||||||
|
#chatbot-header {
|
||||||
|
background-color: var(--vz-primary);
|
||||||
|
color: white;
|
||||||
|
padding: 10px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 16px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Close Button */
|
||||||
|
#chatbot-close {
|
||||||
|
font-size: 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Chatbot Body */
|
||||||
|
#chatbot-body {
|
||||||
|
height: 250px;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Input and Send Button Styling */
|
||||||
|
#chatbot-input-container {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 10px;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#chatbot-input {
|
||||||
|
width: 100%;
|
||||||
|
padding: 10px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 20px;
|
||||||
|
outline: none;
|
||||||
|
font-size: 14px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
#chatbot-send {
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
background-color: transparent;
|
||||||
|
border: none;
|
||||||
|
color: var(--vz-primary);
|
||||||
|
font-size: 18px;
|
||||||
|
cursor: pointer;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@endpush
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
/* floating buttons container */
|
||||||
|
.floating-social {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 210px;
|
||||||
|
right: 45px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 16px;
|
||||||
|
z-index: 9999;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* each circular button */
|
||||||
|
.floating-social .btn-circle {
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 24px;
|
||||||
|
color: #fff;
|
||||||
|
/* white icon */
|
||||||
|
text-decoration: none;
|
||||||
|
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* brand backgrounds */
|
||||||
|
.btn-whatsapp {
|
||||||
|
background: #25D366;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-facebook {
|
||||||
|
background: #1877F2;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.glowing-animation {
|
||||||
|
background-color: #F98D1E;
|
||||||
|
box-shadow: 0 0 10px rgba(249, 141, 30, 0.5),
|
||||||
|
0 0 20px rgba(249, 141, 30, 0.4),
|
||||||
|
0 0 30px rgba(249, 141, 30, 0.3);
|
||||||
|
animation: pulseGlow 2s ease-in-out infinite;
|
||||||
|
border-radius: 50%;
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* .glowing-animation:hover {
|
||||||
|
transform: scale(1.1);
|
||||||
|
} */
|
||||||
|
|
||||||
|
@keyframes pulseGlow {
|
||||||
|
|
||||||
|
0%,
|
||||||
|
100% {
|
||||||
|
box-shadow: 0 0 10px rgba(249, 141, 30, 0.4),
|
||||||
|
0 0 20px rgba(249, 141, 30, 0.3),
|
||||||
|
0 0 30px rgba(249, 141, 30, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
50% {
|
||||||
|
box-shadow: 0 0 20px rgba(249, 141, 30, 0.6),
|
||||||
|
0 0 30px rgba(249, 141, 30, 0.5),
|
||||||
|
0 0 40px rgba(249, 141, 30, 0.4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div class="floating-social">
|
||||||
|
<a href="https://{{ ltrim(setting('whatsapp'), 'https://') }}" target="_blank" class="btn-circle btn-whatsapp">
|
||||||
|
<i class="fab fa-whatsapp"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Chatbot Floating Button -->
|
||||||
|
<div id="chatbot-toggle" class="glowing-animation">
|
||||||
|
<i class="ri-message-2-fill" style="font-size: 30px; color: white;"></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Chatbot UI -->
|
||||||
|
<div id="chatbot-container" style="z-index: 9999">
|
||||||
|
<div id="chatbot-header">
|
||||||
|
Chatbot
|
||||||
|
<span id="chatbot-close">×</span>
|
||||||
|
</div>
|
||||||
|
<div id="chatbot-body"></div>
|
||||||
|
<div id="chatbot-input-container">
|
||||||
|
<input type="text" id="chatbot-input" placeholder="Ask me something...">
|
||||||
|
<button id="chatbot-send">
|
||||||
|
<i class="ri-send-plane-2-fill"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Styles -->
|
||||||
|
@push('css')
|
||||||
|
<style>
|
||||||
|
/* Floating Button */
|
||||||
|
#chatbot-toggle {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 45px;
|
||||||
|
right: 38px;
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
background-color: var(--vz-primary);
|
||||||
|
color: white;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
cursor: pointer;
|
||||||
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
||||||
|
z-index: 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Chat Container */
|
||||||
|
#chatbot-container {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 42px;
|
||||||
|
right: 36px;
|
||||||
|
width: 340px;
|
||||||
|
height: 400px;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 14px;
|
||||||
|
box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.25);
|
||||||
|
font-family: 'Segoe UI', sans-serif;
|
||||||
|
display: none;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
z-index: 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#chatbot-header {
|
||||||
|
background-color: var(--vz-primary);
|
||||||
|
color: white;
|
||||||
|
padding: 12px 16px;
|
||||||
|
font-size: 16px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
#chatbot-body {
|
||||||
|
flex: 1;
|
||||||
|
padding: 12px;
|
||||||
|
overflow-y: auto;
|
||||||
|
background: #f9f9f9;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
scroll-behavior: smooth;
|
||||||
|
}
|
||||||
|
|
||||||
|
.message {
|
||||||
|
position: relative;
|
||||||
|
padding: 10px 16px;
|
||||||
|
margin: 6px 0;
|
||||||
|
border-radius: 20px;
|
||||||
|
max-width: 80%;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.4;
|
||||||
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-message {
|
||||||
|
background-color: rgba(0, 123, 255, 0.15);
|
||||||
|
color: black;
|
||||||
|
align-self: flex-end;
|
||||||
|
margin-left: auto;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bot-message {
|
||||||
|
background-color: rgba(var(--vz-primary-rgb), 0.15);
|
||||||
|
color: black;
|
||||||
|
align-self: flex-start;
|
||||||
|
margin-right: auto;
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.typing-indicator {
|
||||||
|
font-style: italic;
|
||||||
|
font-size: 13px;
|
||||||
|
color: #888;
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#chatbot-input-container {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 10px;
|
||||||
|
border-top: 1px solid #eee;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#chatbot-input {
|
||||||
|
flex: 1;
|
||||||
|
padding: 10px 15px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 30px;
|
||||||
|
font-size: 14px;
|
||||||
|
outline: none;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#chatbot-send {
|
||||||
|
background: var(--vz-primary);
|
||||||
|
border: none;
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: white;
|
||||||
|
font-size: 18px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.floating-social {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 210px;
|
||||||
|
right: 45px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 16px;
|
||||||
|
z-index: 9999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.floating-social .btn-circle {
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 24px;
|
||||||
|
color: #fff;
|
||||||
|
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-whatsapp {
|
||||||
|
background: #25D366;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@endpush
|
||||||
|
|
||||||
|
<!-- Scripts -->
|
||||||
|
@push('js')
|
||||||
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#chatbot-toggle').click(function() {
|
||||||
|
$('#chatbot-container').fadeIn();
|
||||||
|
$(this).hide();
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#chatbot-close').click(function() {
|
||||||
|
$('#chatbot-container').fadeOut();
|
||||||
|
$('#chatbot-toggle').show();
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#chatbot-send').click(sendMessage);
|
||||||
|
$('#chatbot-input').keypress(function(e) {
|
||||||
|
if (e.which == 13) sendMessage();
|
||||||
|
});
|
||||||
|
|
||||||
|
function sendMessage() {
|
||||||
|
const input = $('#chatbot-input');
|
||||||
|
const body = $('#chatbot-body');
|
||||||
|
const message = input.val().trim();
|
||||||
|
|
||||||
|
if (message === '') return;
|
||||||
|
|
||||||
|
body.append('<div class="message user-message">You: ' + message + '</div>');
|
||||||
|
input.val('');
|
||||||
|
body.append('<div class="typing-indicator" id="typing">Bot is typing...</div>');
|
||||||
|
scrollToBottom();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: '{{ route('chatbot.query') }}',
|
||||||
|
type: 'POST',
|
||||||
|
data: {
|
||||||
|
message: message,
|
||||||
|
_token: '{{ csrf_token() }}'
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
$('#typing').remove();
|
||||||
|
body.append('<div class="message bot-message">Bot: ' + response.reply +
|
||||||
|
'</div>');
|
||||||
|
scrollToBottom();
|
||||||
|
},
|
||||||
|
error: function() {
|
||||||
|
$('#typing').remove();
|
||||||
|
body.append(
|
||||||
|
'<div class="message bot-message">Bot: Sorry, something went wrong.</div>'
|
||||||
|
);
|
||||||
|
scrollToBottom();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function scrollToBottom() {
|
||||||
|
const body = $('#chatbot-body');
|
||||||
|
body.scrollTop(body[0].scrollHeight);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
@endpush
|
7
Modules/Chatbot/resources/views/index.blade.php
Normal file
7
Modules/Chatbot/resources/views/index.blade.php
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
@extends('chatbot::layouts.master')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<h1>Hello World</h1>
|
||||||
|
|
||||||
|
<p>Module: {!! config('chatbot.name') !!}</p>
|
||||||
|
@endsection
|
29
Modules/Chatbot/resources/views/layouts/master.blade.php
Normal file
29
Modules/Chatbot/resources/views/layouts/master.blade.php
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
|
||||||
|
<title>Chatbot Module - {{ config('app.name', 'Laravel') }}</title>
|
||||||
|
|
||||||
|
<meta name="description" content="{{ $description ?? '' }}">
|
||||||
|
<meta name="keywords" content="{{ $keywords ?? '' }}">
|
||||||
|
<meta name="author" content="{{ $author ?? '' }}">
|
||||||
|
|
||||||
|
<!-- Fonts -->
|
||||||
|
<link rel="preconnect" href="https://fonts.bunny.net">
|
||||||
|
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />
|
||||||
|
|
||||||
|
{{-- Vite CSS --}}
|
||||||
|
{{-- {{ module_vite('build-chatbot', 'resources/assets/sass/app.scss', storage_path('vite.hot')) }} --}}
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
@yield('content')
|
||||||
|
|
||||||
|
{{-- Vite JS --}}
|
||||||
|
{{-- {{ module_vite('build-chatbot', 'resources/assets/js/app.js', storage_path('vite.hot')) }} --}}
|
||||||
|
</body>
|
0
Modules/Chatbot/routes/.gitkeep
Normal file
0
Modules/Chatbot/routes/.gitkeep
Normal file
19
Modules/Chatbot/routes/api.php
Normal file
19
Modules/Chatbot/routes/api.php
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Route;
|
||||||
|
use Modules\Chatbot\Http\Controllers\ChatbotController;
|
||||||
|
|
||||||
|
/*
|
||||||
|
*--------------------------------------------------------------------------
|
||||||
|
* API Routes
|
||||||
|
*--------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Here is where you can register API routes for your application. These
|
||||||
|
* routes are loaded by the RouteServiceProvider within a group which
|
||||||
|
* is assigned the "api" middleware group. Enjoy building your API!
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
Route::middleware(['auth:sanctum'])->prefix('v1')->group(function () {
|
||||||
|
Route::apiResource('chatbot', ChatbotController::class)->names('chatbot');
|
||||||
|
});
|
21
Modules/Chatbot/routes/web.php
Normal file
21
Modules/Chatbot/routes/web.php
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Route;
|
||||||
|
use Modules\Chatbot\Http\Controllers\ChatbotController;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Web Routes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here is where you can register web routes for your application. These
|
||||||
|
| routes are loaded by the RouteServiceProvider within a group which
|
||||||
|
| contains the "web" middleware group. Now create something great!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
Route::group([], function () {
|
||||||
|
|
||||||
|
Route::post('/chatbot/query', [ChatbotController::class, 'query'])->name('chatbot.query');
|
||||||
|
Route::resource('chatbot', ChatbotController::class)->names('chatbot');
|
||||||
|
});
|
57
Modules/Chatbot/vite.config.js
Normal file
57
Modules/Chatbot/vite.config.js
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
import { defineConfig } from 'vite';
|
||||||
|
import laravel from 'laravel-vite-plugin';
|
||||||
|
import { readdirSync, statSync } from 'fs';
|
||||||
|
import { join,relative,dirname } from 'path';
|
||||||
|
import { fileURLToPath } from 'url';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
build: {
|
||||||
|
outDir: '../../public/build-chatbot',
|
||||||
|
emptyOutDir: true,
|
||||||
|
manifest: true,
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
laravel({
|
||||||
|
publicDirectory: '../../public',
|
||||||
|
buildDirectory: 'build-chatbot',
|
||||||
|
input: [
|
||||||
|
__dirname + '/resources/assets/sass/app.scss',
|
||||||
|
__dirname + '/resources/assets/js/app.js'
|
||||||
|
],
|
||||||
|
refresh: true,
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
});
|
||||||
|
// Scen all resources for assets file. Return array
|
||||||
|
//function getFilePaths(dir) {
|
||||||
|
// const filePaths = [];
|
||||||
|
//
|
||||||
|
// function walkDirectory(currentPath) {
|
||||||
|
// const files = readdirSync(currentPath);
|
||||||
|
// for (const file of files) {
|
||||||
|
// const filePath = join(currentPath, file);
|
||||||
|
// const stats = statSync(filePath);
|
||||||
|
// if (stats.isFile() && !file.startsWith('.')) {
|
||||||
|
// const relativePath = 'Modules/Chatbot/'+relative(__dirname, filePath);
|
||||||
|
// filePaths.push(relativePath);
|
||||||
|
// } else if (stats.isDirectory()) {
|
||||||
|
// walkDirectory(filePath);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// walkDirectory(dir);
|
||||||
|
// return filePaths;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//const __filename = fileURLToPath(import.meta.url);
|
||||||
|
//const __dirname = dirname(__filename);
|
||||||
|
|
||||||
|
//const assetsDir = join(__dirname, 'resources/assets');
|
||||||
|
//export const paths = getFilePaths(assetsDir);
|
||||||
|
|
||||||
|
|
||||||
|
//export const paths = [
|
||||||
|
// 'Modules/Chatbot/resources/assets/sass/app.scss',
|
||||||
|
// 'Modules/Chatbot/resources/assets/js/app.js',
|
||||||
|
//];
|
@@ -14,10 +14,9 @@ class CostCalculatorService
|
|||||||
$query->where('country_id', $request->country_id);
|
$query->where('country_id', $request->country_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($request->filled('stay_type_id')) {
|
// if ($request->filled('stay_type_id')) {
|
||||||
$query->where("stay_type_id", $request->stay_type_id);
|
// $query->where("stay_type_id", $request->stay_type_id);
|
||||||
}
|
// }
|
||||||
|
|
||||||
})->latest()->paginate(10)->withQueryString();
|
})->latest()->paginate(10)->withQueryString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
namespace Modules\Document\Http\Controllers;
|
namespace Modules\Document\Http\Controllers;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Database\Eloquent\Collection;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use Modules\CCMS\Models\Country;
|
use Modules\CCMS\Models\Country;
|
||||||
@@ -13,6 +14,7 @@ use Modules\Document\Services\DocumentService;
|
|||||||
use Yajra\DataTables\Facades\DataTables;
|
use Yajra\DataTables\Facades\DataTables;
|
||||||
use Illuminate\Support\Facades\Validator;
|
use Illuminate\Support\Facades\Validator;
|
||||||
use Illuminate\Support\Facades\File;
|
use Illuminate\Support\Facades\File;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
|
|
||||||
class DocumentController extends Controller
|
class DocumentController extends Controller
|
||||||
@@ -26,14 +28,66 @@ class DocumentController extends Controller
|
|||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$title = 'Upload Documents';
|
$title = "Upload Document";
|
||||||
$countryOptions = Country::whereNull('parent_id')->pluck('title', 'id')->mapWithKeys(fn($title, $id) => ["Country:$id" => "Country - $title"]);
|
$countryOptions = Country::whereNull('parent_id')->pluck('title', 'id')->mapWithKeys(fn($title, $id) => ["Country:$id" => "Country - $title"]);
|
||||||
$serviceOptions = Service::whereNull('parent_id')->pluck('title', 'id')->mapWithKeys(fn($title, $id) => ["Service:$id" => "Service - $title"]);
|
$serviceOptions = Service::whereNull('parent_id')->pluck('title', 'id')->mapWithKeys(fn($title, $id) => ["Service:$id" => "Service - $title"]);
|
||||||
$testOptions = Test::whereNull('parent_id')->pluck('title', 'id')->mapWithKeys(fn($title, $id) => ["Test:$id" => "Test - $title"]);
|
$testOptions = Test::whereNull('parent_id')->pluck('title', 'id')->mapWithKeys(fn($title, $id) => ["Test:$id" => "Test - $title"]);
|
||||||
|
|
||||||
$modelOptions = $countryOptions->merge($serviceOptions)->merge($testOptions);
|
$modelOptions = $countryOptions->merge($serviceOptions)->merge($testOptions);
|
||||||
|
|
||||||
return view('document::document.index', compact('modelOptions', 'title'));
|
if (request()->ajax()) {
|
||||||
|
$model = Document::query()->latest();
|
||||||
|
return DataTables::eloquent($model)
|
||||||
|
->setRowClass('tableRow')
|
||||||
|
->addColumn('name', function (Document $document) {
|
||||||
|
$extension = $document->getExtension();
|
||||||
|
$assetUrl = $document->getUrl();
|
||||||
|
$html = $document->isImageFile()
|
||||||
|
? "<div class='flex-shrink-0'>
|
||||||
|
<div class='avatar-sm bg-light rounded p-1'>
|
||||||
|
<a href='{$assetUrl}' data-fancybox='gallery' data-caption='{$document->title}'>
|
||||||
|
<img src='{$assetUrl}' alt='' class='avatar-sm img-fluid d-block'>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>"
|
||||||
|
: "<div class='flex-shrink-0'>
|
||||||
|
<div class='avatar-sm'>
|
||||||
|
<a href='{$assetUrl}' data-fancybox='gallery' data-caption='{$document->title}'>
|
||||||
|
<div class='avatar-title bg-" . getFileIcon($extension)[1] . "-subtle text-" . getFileIcon($extension)[1] . " fs-20 material-shadow rounded'>
|
||||||
|
<i class='" . getFileIcon($extension)[0] . "'></i>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>";
|
||||||
|
|
||||||
|
return "<div class='d-flex align-items-center'>
|
||||||
|
{$html} <div class='flex-grow-1 ms-3'>
|
||||||
|
<h6 class='fs-12 mb-0'>{$document->title}</h6>
|
||||||
|
</div>
|
||||||
|
</div>";
|
||||||
|
})
|
||||||
|
->addColumn('type', function (Document $document) {
|
||||||
|
return $document->getExtension();
|
||||||
|
})
|
||||||
|
->addColumn('size', function (Document $document) {
|
||||||
|
return $document->getSize();
|
||||||
|
})
|
||||||
|
->editColumn('created_at', function (Document $document) {
|
||||||
|
return getFormatted($document->created_at);
|
||||||
|
})
|
||||||
|
->addColumn('action', function (Document $document) {
|
||||||
|
return view('document::document.partials.action', ['document' => $document]);
|
||||||
|
})
|
||||||
|
->rawColumns(['action', 'name', 'size'])
|
||||||
|
->toJson();
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('document::document.index', [
|
||||||
|
'title' => $title,
|
||||||
|
'countryOptions' => $countryOptions,
|
||||||
|
'serviceOptions' => $serviceOptions,
|
||||||
|
'testOptions' => $testOptions,
|
||||||
|
'modelOptions' => $modelOptions,
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -48,7 +102,7 @@ class DocumentController extends Controller
|
|||||||
$document->delete();
|
$document->delete();
|
||||||
|
|
||||||
session()->flash('Document Deleted');
|
session()->flash('Document Deleted');
|
||||||
return response()->json(['status' => true, 'msg' => 'Document Deleted']);
|
return response()->json(['status' => 200, 'message' => 'Document Deleted Successfully']);
|
||||||
} catch (\Throwable $th) {
|
} catch (\Throwable $th) {
|
||||||
session()->flash('error', $th->getMessage());
|
session()->flash('error', $th->getMessage());
|
||||||
}
|
}
|
||||||
@@ -122,6 +176,12 @@ class DocumentController extends Controller
|
|||||||
|
|
||||||
public function getAllDocuments()
|
public function getAllDocuments()
|
||||||
{
|
{
|
||||||
|
$countryOptions = Country::whereNull('parent_id')->pluck('title', 'id')->mapWithKeys(fn($title, $id) => ["Country:$id" => "Country - $title"]);
|
||||||
|
$serviceOptions = Service::whereNull('parent_id')->pluck('title', 'id')->mapWithKeys(fn($title, $id) => ["Service:$id" => "Service - $title"]);
|
||||||
|
$testOptions = Test::whereNull('parent_id')->pluck('title', 'id')->mapWithKeys(fn($title, $id) => ["Test:$id" => "Test - $title"]);
|
||||||
|
$modelOptions = $countryOptions->merge($serviceOptions)->merge($testOptions);
|
||||||
|
|
||||||
|
if (request()->ajax()) {
|
||||||
$model = Document::query()->latest();
|
$model = Document::query()->latest();
|
||||||
return DataTables::eloquent($model)
|
return DataTables::eloquent($model)
|
||||||
->setRowClass('tableRow')
|
->setRowClass('tableRow')
|
||||||
@@ -168,18 +228,25 @@ class DocumentController extends Controller
|
|||||||
->toJson();
|
->toJson();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return view('document::document.index', [
|
||||||
|
'countryOptions' => $countryOptions,
|
||||||
|
'serviceOptions' => $serviceOptions,
|
||||||
|
'testOptions' => $testOptions,
|
||||||
|
'modelOptions' => $modelOptions,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
public function reorder(Request $request)
|
public function reorder(Request $request)
|
||||||
{
|
{
|
||||||
Document::chunkById(100, function (Collection $documents) use ($request) {
|
$partners = Document::all();
|
||||||
foreach ($documents as $document) {
|
|
||||||
foreach ($request->order as $order) {
|
|
||||||
if ($order['id'] == $document->id) {
|
|
||||||
$document->update(['order' => $order['position']]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
foreach ($partners as $partner) {
|
||||||
|
foreach ($request->order as $order) {
|
||||||
|
if ($order['id'] == $partner->id) {
|
||||||
|
$partner->update(['order' => $order['position']]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return response(['status' => true, 'message' => 'Reordered successfully'], 200);
|
return response(['status' => true, 'message' => 'Reordered successfully'], 200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
];
|
];
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
<x-data-table-script :route="route('documents.getAllDocuments')" :columns="$columns" id="documents-table" :reorder="route('documents.reorder')" />
|
<x-data-table-script :route="route('documents.index')" :columns="$columns" :reorder="route('documents.reorder')" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,7 +1,5 @@
|
|||||||
<div class="hstack flex-wrap gap-3 align-items-center">
|
<div class="hstack flex-wrap gap-3 align-items-center">
|
||||||
<a href="{{ $document->getUrl() }}" class="link-primary fs-15" download><i class="ri-download-2-line"></i></a>
|
<a href="{{ $document->getUrl() }}" class="link-primary fs-15" download><i class="ri-download-2-line"></i></a>
|
||||||
@can('documents.destroy')
|
|
||||||
<a href="javascript:void(0);" data-link="{{ route('documents.destroy', $document->id) }}"
|
<a href="javascript:void(0);" data-link="{{ route('documents.destroy', $document->id) }}"
|
||||||
class="link-danger fs-15 remove-item"><i class="ri-delete-bin-line"></i></a>
|
class="link-danger fs-15 remove-item"><i class="ri-delete-bin-line"></i></a>
|
||||||
@endcan
|
|
||||||
</div>
|
</div>
|
||||||
|
@@ -16,10 +16,9 @@ use Modules\Meeting\Http\Controllers\MeetingController;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
Route::group(['middleware' => ['web', 'auth', 'permission'], 'prefix' => 'admin/'], function () {
|
Route::group(['middleware' => ['web', 'auth', 'permission'], 'prefix' => 'admin/'], function () {
|
||||||
Route::resource('event', EventController::class)->names('event');
|
// Route::resource('event', EventController::class)->names('event');
|
||||||
|
|
||||||
Route::post('meeting/sub-task', [MeetingController::class, 'storeSubTask'])->name('meeting.storeSubTask');
|
Route::post('meeting/sub-task', [MeetingController::class, 'storeSubTask'])->name('meeting.storeSubTask');
|
||||||
Route::resource('meeting', MeetingController::class)->names('meeting');
|
Route::resource('meeting', MeetingController::class)->names('meeting');
|
||||||
Route::get('meeting/{id}/send-email', [MeetingController::class, 'sendEmail'])->name('meeting.sendmail');
|
Route::get('meeting/{id}/send-email', [MeetingController::class, 'sendEmail'])->name('meeting.sendmail');
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@@ -29,7 +29,7 @@ class UserService
|
|||||||
'name' => $userData['name'],
|
'name' => $userData['name'],
|
||||||
'email' => $userData['email'],
|
'email' => $userData['email'],
|
||||||
'password' => Hash::make($userData['password'] ?? "password"),
|
'password' => Hash::make($userData['password'] ?? "password"),
|
||||||
'can_login' => $userData['can_login'] ?? false,
|
'can_login' => $userData['can_login'] ?? true,
|
||||||
'order' => $userData['order'],
|
'order' => $userData['order'],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@@ -3,6 +3,10 @@
|
|||||||
use App\Http\Controllers\WebsiteController;
|
use App\Http\Controllers\WebsiteController;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
use Modules\CCMS\Http\Controllers\EnquiryController;
|
use Modules\CCMS\Http\Controllers\EnquiryController;
|
||||||
|
use Modules\CCMS\Http\Controllers\FranchiseController;
|
||||||
|
use Modules\CCMS\Http\Controllers\NewsletterController;
|
||||||
|
use Modules\CCMS\Http\Controllers\VacancyController;
|
||||||
|
use Modules\CCMS\Models\Franchise;
|
||||||
use Modules\CourseFinder\Http\Controllers\CoopController;
|
use Modules\CourseFinder\Http\Controllers\CoopController;
|
||||||
use Modules\CourseFinder\Http\Controllers\ProgramController;
|
use Modules\CourseFinder\Http\Controllers\ProgramController;
|
||||||
use Modules\CourseFinder\Http\Controllers\ProgramLevelController;
|
use Modules\CourseFinder\Http\Controllers\ProgramLevelController;
|
||||||
@@ -19,6 +23,12 @@ Route::get('destination/{alias}', [WebsiteController::class, 'countrySingle'])->
|
|||||||
Route::get('/home/resources', [WebsiteController::class, 'resources']);
|
Route::get('/home/resources', [WebsiteController::class, 'resources']);
|
||||||
Route::get('getCoursesList', [ProgramController::class, 'getCoursesList'])->name('program.getCoursesList');
|
Route::get('getCoursesList', [ProgramController::class, 'getCoursesList'])->name('program.getCoursesList');
|
||||||
Route::post('enquiry', [EnquiryController::class, 'store'])->name('enquiry.store');
|
Route::post('enquiry', [EnquiryController::class, 'store'])->name('enquiry.store');
|
||||||
|
Route::post('franchise', [FranchiseController::class, 'store'])->name('franchise.store');
|
||||||
|
Route::post('newsletter', [NewsletterController::class, 'store'])->name('newsletter.store');
|
||||||
|
Route::post('vacancy', [VacancyController::class, 'store'])->name('vacancy.store');
|
||||||
|
|
||||||
|
Route::get('career/{id}', [WebsiteController::class, 'careerSingle'])->name('career.single');
|
||||||
|
|
||||||
Route::get('getCost', [WebsiteController::class, 'getCost'])->name('cost.getCost');
|
Route::get('getCost', [WebsiteController::class, 'getCost'])->name('cost.getCost');
|
||||||
Route::get('/thankyou', [WebsiteController::class, 'thankyouPage'])->name('thankyou');
|
Route::get('/thankyou', [WebsiteController::class, 'thankyouPage'])->name('thankyou');
|
||||||
|
|
||||||
|
@@ -1,9 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Modules\CCMS\Models\Blog;
|
use Modules\CCMS\Models\Blog;
|
||||||
|
use Modules\CCMS\Models\Career;
|
||||||
use Modules\CCMS\Models\Category;
|
use Modules\CCMS\Models\Category;
|
||||||
use Modules\CCMS\Models\Counter;
|
use Modules\CCMS\Models\Counter;
|
||||||
use Modules\CCMS\Models\Country;
|
use Modules\CCMS\Models\Country;
|
||||||
|
use Modules\CCMS\Models\Event;
|
||||||
use Modules\CCMS\Models\Faq;
|
use Modules\CCMS\Models\Faq;
|
||||||
use Modules\CCMS\Models\FaqCategory;
|
use Modules\CCMS\Models\FaqCategory;
|
||||||
use Modules\CCMS\Models\Gallery;
|
use Modules\CCMS\Models\Gallery;
|
||||||
@@ -150,6 +152,44 @@ function getServices($limit = null, $order = 'desc')
|
|||||||
->get();
|
->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getCareers($limit = null, $order = 'desc')
|
||||||
|
{
|
||||||
|
return Career::query()
|
||||||
|
->where('status', 1)
|
||||||
|
->orderBy('order', $order)
|
||||||
|
->when($limit, function ($query) use ($limit) {
|
||||||
|
$query->limit($limit);
|
||||||
|
})
|
||||||
|
->get();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function previousEvents($limit = null, $order = 'desc')
|
||||||
|
{
|
||||||
|
return Event::query()
|
||||||
|
->where('status', 1)
|
||||||
|
->where('parent_id', null)
|
||||||
|
->where('start_date', '<=', now())
|
||||||
|
->orderBy('order', $order)
|
||||||
|
->when($limit, function ($query) use ($limit) {
|
||||||
|
$query->limit($limit);
|
||||||
|
})
|
||||||
|
->get();
|
||||||
|
}
|
||||||
|
|
||||||
|
function upcomingEvents($limit = null, $order = 'desc')
|
||||||
|
{
|
||||||
|
return Event::query()
|
||||||
|
->where('status', 1)
|
||||||
|
->where('parent_id', null)
|
||||||
|
->where('start_date', '>=', now())
|
||||||
|
->orderBy('order', $order)
|
||||||
|
->when($limit, function ($query) use ($limit) {
|
||||||
|
$query->limit($limit);
|
||||||
|
})
|
||||||
|
->get();
|
||||||
|
}
|
||||||
|
|
||||||
function getInstitutions($limit = null, $order = 'desc')
|
function getInstitutions($limit = null, $order = 'desc')
|
||||||
{
|
{
|
||||||
return Institution::query()
|
return Institution::query()
|
||||||
|
@@ -6,6 +6,7 @@ use App\Models\User;
|
|||||||
use Illuminate\Support\Facades\Session;
|
use Illuminate\Support\Facades\Session;
|
||||||
use Modules\CCMS\Models\Blog;
|
use Modules\CCMS\Models\Blog;
|
||||||
use Modules\CCMS\Models\Enquiry;
|
use Modules\CCMS\Models\Enquiry;
|
||||||
|
use Modules\CCMS\Models\Event;
|
||||||
use Modules\CCMS\Models\Partner;
|
use Modules\CCMS\Models\Partner;
|
||||||
use Modules\CCMS\Models\Service;
|
use Modules\CCMS\Models\Service;
|
||||||
use Modules\CCMS\Models\Team;
|
use Modules\CCMS\Models\Team;
|
||||||
@@ -21,6 +22,7 @@ class DashboardController extends Controller
|
|||||||
'teamsCount' => Team::where('status', 1)->count(),
|
'teamsCount' => Team::where('status', 1)->count(),
|
||||||
'servicesCount' => Service::where('status', 1)->count(),
|
'servicesCount' => Service::where('status', 1)->count(),
|
||||||
'partnersCount' => Partner::where('status', 1)->count(),
|
'partnersCount' => Partner::where('status', 1)->count(),
|
||||||
|
'events' => Event::where('start_date', '>=', now())->limit(2)->get(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -30,9 +32,6 @@ class DashboardController extends Controller
|
|||||||
$model = Enquiry::query()->where('is_read', 0)->latest();
|
$model = Enquiry::query()->where('is_read', 0)->latest();
|
||||||
return DataTables::eloquent($model)
|
return DataTables::eloquent($model)
|
||||||
->addIndexColumn()
|
->addIndexColumn()
|
||||||
->editColumn('class', function (Enquiry $enquiry) {
|
|
||||||
return $enquiry->class ?? '-';
|
|
||||||
})
|
|
||||||
->editColumn('subject', function (Enquiry $enquiry) {
|
->editColumn('subject', function (Enquiry $enquiry) {
|
||||||
return $enquiry->subject ?? '-';
|
return $enquiry->subject ?? '-';
|
||||||
})
|
})
|
||||||
|
@@ -5,6 +5,7 @@ namespace App\Http\Controllers;
|
|||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\View;
|
use Illuminate\Support\Facades\View;
|
||||||
use Modules\CCMS\Models\Blog;
|
use Modules\CCMS\Models\Blog;
|
||||||
|
use Modules\CCMS\Models\Career;
|
||||||
use Modules\CCMS\Models\Country;
|
use Modules\CCMS\Models\Country;
|
||||||
use Modules\CCMS\Models\Institution;
|
use Modules\CCMS\Models\Institution;
|
||||||
use Modules\CCMS\Models\Page;
|
use Modules\CCMS\Models\Page;
|
||||||
@@ -17,6 +18,7 @@ use Modules\CourseFinder\Models\Coop;
|
|||||||
use Modules\CourseFinder\Models\Program;
|
use Modules\CourseFinder\Models\Program;
|
||||||
use Modules\CourseFinder\Models\ProgramLevel;
|
use Modules\CourseFinder\Models\ProgramLevel;
|
||||||
use Modules\CourseFinder\Services\ProgramService;
|
use Modules\CourseFinder\Services\ProgramService;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
class WebsiteController extends Controller
|
class WebsiteController extends Controller
|
||||||
{
|
{
|
||||||
@@ -33,6 +35,8 @@ class WebsiteController extends Controller
|
|||||||
$countries = Country::where('status', 1)->where('parent_id', null)->get();
|
$countries = Country::where('status', 1)->where('parent_id', null)->get();
|
||||||
$interviews = Service::where('status', 1)->where('parent_id', null)->get();
|
$interviews = Service::where('status', 1)->where('parent_id', null)->get();
|
||||||
$services = Service::where('status', 1)->where('parent_id', null)->get();
|
$services = Service::where('status', 1)->where('parent_id', null)->get();
|
||||||
|
$data['previousEvents'] = previousEvents(limit: null, order: 'asc');
|
||||||
|
$data['upcomingEvents'] = upcomingEvents(limit: null, order: 'asc');
|
||||||
$this->path = config('app.client');
|
$this->path = config('app.client');
|
||||||
|
|
||||||
view()->share([
|
view()->share([
|
||||||
@@ -42,6 +46,8 @@ class WebsiteController extends Controller
|
|||||||
'countries' => $countries,
|
'countries' => $countries,
|
||||||
'services' => $services,
|
'services' => $services,
|
||||||
'interviews' => $interviews,
|
'interviews' => $interviews,
|
||||||
|
'previousEvents' => $data['previousEvents'],
|
||||||
|
'upcomingEvents' => $data['upcomingEvents'],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,7 +63,7 @@ class WebsiteController extends Controller
|
|||||||
$data['faqs'] = getFAQs(limit: null, order: 'desc');
|
$data['faqs'] = getFAQs(limit: null, order: 'desc');
|
||||||
$data['testimonials'] = getTestimonials(limit: null, order: 'desc');
|
$data['testimonials'] = getTestimonials(limit: null, order: 'desc');
|
||||||
$data['blogs'] = getBlogs(limit: 4, order: 'desc');
|
$data['blogs'] = getBlogs(limit: 4, order: 'desc');
|
||||||
$data['partners'] = getPartners(limit: 4, order: 'desc');
|
$data['partners'] = getPartners();
|
||||||
$data['gallaries'] = getGalleries(limit: 6, order: 'asc');
|
$data['gallaries'] = getGalleries(limit: 6, order: 'asc');
|
||||||
$data['achievementGalleries'] = getGalleriesByCategory(limit: null, order: 'asc', category: 'achievement');
|
$data['achievementGalleries'] = getGalleriesByCategory(limit: null, order: 'asc', category: 'achievement');
|
||||||
$data['visaGalleries'] = getGalleriesByCategory(limit: null, order: 'asc', category: 'visa-success');
|
$data['visaGalleries'] = getGalleriesByCategory(limit: null, order: 'asc', category: 'visa-success');
|
||||||
@@ -126,6 +132,13 @@ class WebsiteController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function careerSingle($id)
|
||||||
|
{
|
||||||
|
$data['career'] = Career::findorFail($id);
|
||||||
|
|
||||||
|
return view("client.$this->path.pages.career-detail-template", $data);
|
||||||
|
}
|
||||||
|
|
||||||
public function testSingle($alias)
|
public function testSingle($alias)
|
||||||
{
|
{
|
||||||
$testPreparations = $data["page"] = Test::where('status', 1)
|
$testPreparations = $data["page"] = Test::where('status', 1)
|
||||||
@@ -176,7 +189,8 @@ class WebsiteController extends Controller
|
|||||||
$page = getPageWithChildrenBySlug(parent: $parent, slug: $slug, limit: null, order: 'asc');
|
$page = getPageWithChildrenBySlug(parent: $parent, slug: $slug, limit: null, order: 'asc');
|
||||||
$teams = getTeams(limit: null, order: 'asc');
|
$teams = getTeams(limit: null, order: 'asc');
|
||||||
$blogs = getBlogs(limit: null, order: 'asc');
|
$blogs = getBlogs(limit: null, order: 'asc');
|
||||||
|
$galleriesCSR = getPageWithChildrenBySlug(parent: $parent, slug: 'gallery', limit: null, order: 'asc');
|
||||||
|
$careers = getCareers(limit: null, order: 'asc');
|
||||||
if (!$page) {
|
if (!$page) {
|
||||||
return view('client.raffles.errors.404');
|
return view('client.raffles.errors.404');
|
||||||
}
|
}
|
||||||
@@ -187,7 +201,7 @@ class WebsiteController extends Controller
|
|||||||
return view('client.raffles.errors.404');
|
return view('client.raffles.errors.404');
|
||||||
}
|
}
|
||||||
|
|
||||||
return view($path, ['page' => $page, 'teams' => $teams, 'blogs' => $blogs]);
|
return view($path, ['page' => $page, 'teams' => $teams, 'blogs' => $blogs, 'galleriesCSR' => $galleriesCSR], ['careers' => $careers]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function fallback()
|
public function fallback()
|
||||||
@@ -259,19 +273,29 @@ class WebsiteController extends Controller
|
|||||||
|
|
||||||
public function getCost(Request $request)
|
public function getCost(Request $request)
|
||||||
{
|
{
|
||||||
$data['costss'] = $this->costCalculatorService->findAll($request);
|
$costs = $this->costCalculatorService->findAll($request);
|
||||||
foreach ($data['costss'] as $value) {
|
|
||||||
$id = $value->id;
|
if ($costs->isEmpty()) {
|
||||||
|
return view("client.raffles.errors.404");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$id = $costs->last()->id;
|
||||||
|
|
||||||
$cost = CostCalculator::with([
|
$cost = CostCalculator::with([
|
||||||
'stayTypeLiving',
|
'stayTypeLiving',
|
||||||
'stayTypeAccomodation',
|
'stayTypeAccomodation',
|
||||||
'stayTypeOnetime',
|
'stayTypeOnetime',
|
||||||
'stayTypeService'
|
'stayTypeService'
|
||||||
])->findOrFail($id);
|
])->find($id);
|
||||||
$data['fee'] = Program::where('id', $request->program_id)->first();
|
|
||||||
$data['title'] = 'View Cost Calculation';
|
if (!$cost) {
|
||||||
$data['cost'] = $cost;
|
return view("client.raffles.errors.404");
|
||||||
|
}
|
||||||
|
$program = Program::find($request->program_id);
|
||||||
|
|
||||||
|
if (!$program) {
|
||||||
|
return view("client.raffles.errors.404");
|
||||||
|
}
|
||||||
|
|
||||||
$getBreakdown = function ($stayTypeTitle) use ($cost) {
|
$getBreakdown = function ($stayTypeTitle) use ($cost) {
|
||||||
$living = optional($cost->stayTypeLiving->firstWhere('title', $stayTypeTitle))->pivot;
|
$living = optional($cost->stayTypeLiving->firstWhere('title', $stayTypeTitle))->pivot;
|
||||||
@@ -304,16 +328,25 @@ class WebsiteController extends Controller
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
$data['breakdowns'] = [
|
$data = [
|
||||||
|
'serviceStatus' => $request->services,
|
||||||
|
'costs' => $costs,
|
||||||
|
'fee' => $program,
|
||||||
|
'title' => 'View Cost Calculation',
|
||||||
|
'cost' => $cost,
|
||||||
|
'type' => Str::slug($request->status_type_id),
|
||||||
|
'breakdowns' => [
|
||||||
'alone' => $getBreakdown('Alone'),
|
'alone' => $getBreakdown('Alone'),
|
||||||
'with_spouse' => $getBreakdown('With Spouse'),
|
'with-spouse' => $getBreakdown('With Spouse'),
|
||||||
'with_spouse_and_child' => $getBreakdown('With Spouse and Child'),
|
'with-spouse-and-child' => $getBreakdown('With Spouse and Child'),
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
return view('client.raffles.pages.cost-result', $data);
|
return view('client.raffles.pages.cost-result', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function thankyouPage(Request $r)
|
public function thankyouPage(Request $r)
|
||||||
{
|
{
|
||||||
$data = new \stdClass();
|
$data = new \stdClass();
|
||||||
|
@@ -125,7 +125,7 @@ return [
|
|||||||
],
|
],
|
||||||
|
|
||||||
'sidebar' => [
|
'sidebar' => [
|
||||||
'default' => env('DEFAULT_SIDEBAR', 'cpm-sidebar'),
|
'default' => env('DEFAULT_SIDEBAR', 'sidebar'),
|
||||||
'other' => env('OTHER_SIDEBAR', 'sidebar'),
|
'other' => env('OTHER_SIDEBAR', 'sidebar'),
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
@@ -3,12 +3,12 @@ return [
|
|||||||
[
|
[
|
||||||
'text' => 'Dashboard',
|
'text' => 'Dashboard',
|
||||||
'url' => 'admin/dashboard',
|
'url' => 'admin/dashboard',
|
||||||
'icon' => 'ri-home-4-line',
|
'icon' => 'ri-home-fill text-primary',
|
||||||
],
|
],
|
||||||
|
|
||||||
[
|
[
|
||||||
'text' => 'Authorization',
|
'text' => 'Authorization',
|
||||||
'icon' => 'ri-user-settings-line',
|
'icon' => 'ri-user-settings-fill text-dark',
|
||||||
'module' => 'User',
|
'module' => 'User',
|
||||||
'submenu' => [
|
'submenu' => [
|
||||||
[
|
[
|
||||||
@@ -32,7 +32,7 @@ return [
|
|||||||
[
|
[
|
||||||
'text' => 'Setting',
|
'text' => 'Setting',
|
||||||
'url' => 'admin/setting',
|
'url' => 'admin/setting',
|
||||||
'icon' => 'ri-settings-4-line',
|
'icon' => 'ri-settings-2-fill text-danger',
|
||||||
'module' => 'CCMS',
|
'module' => 'CCMS',
|
||||||
'can' => ['setting.index'],
|
'can' => ['setting.index'],
|
||||||
],
|
],
|
||||||
@@ -40,31 +40,61 @@ return [
|
|||||||
[
|
[
|
||||||
'text' => 'Menu',
|
'text' => 'Menu',
|
||||||
'url' => 'admin/menu',
|
'url' => 'admin/menu',
|
||||||
'icon' => 'ri-menu-line',
|
'icon' => 'ri-menu-fill text-dark',
|
||||||
'module' => 'CCMS',
|
'module' => 'CCMS',
|
||||||
'can' => ['menu.index'],
|
'can' => ['menu.index'],
|
||||||
],
|
],
|
||||||
|
|
||||||
[
|
[
|
||||||
'text' => 'Offer Popup',
|
'text' => 'Enquiries',
|
||||||
'url' => 'admin/popup',
|
'icon' => 'ri-cellphone-fill text-success',
|
||||||
'icon' => 'ri-gift-2-line',
|
|
||||||
'module' => 'CCMS',
|
'module' => 'CCMS',
|
||||||
'can' => ['popup.index'],
|
'submenu' => [
|
||||||
|
|
||||||
|
[
|
||||||
|
'text' => 'Enquiry',
|
||||||
|
'url' => 'admin/enquiry',
|
||||||
|
'can' => ['enquiry.index'],
|
||||||
|
],
|
||||||
|
|
||||||
|
[
|
||||||
|
'text' => 'Counsellor Request',
|
||||||
|
'url' => 'admin/counselor',
|
||||||
|
'can' => ['counselor.index'],
|
||||||
|
],
|
||||||
|
|
||||||
|
[
|
||||||
|
'text' => 'Franchise Request',
|
||||||
|
'url' => 'admin/franchise',
|
||||||
|
'can' => ['franchise.index'],
|
||||||
|
],
|
||||||
|
|
||||||
|
[
|
||||||
|
'text' => 'Newsletter',
|
||||||
|
'url' => 'admin/newsletter',
|
||||||
|
'can' => ['newsletter.index'],
|
||||||
|
],
|
||||||
|
|
||||||
|
[
|
||||||
|
'text' => 'Vacancy Application',
|
||||||
|
'url' => 'admin/vacancy',
|
||||||
|
'can' => ['vacancy.index'],
|
||||||
|
],
|
||||||
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
[
|
[
|
||||||
'text' => 'Counter',
|
'text' => 'Counter',
|
||||||
'url' => 'admin/counter',
|
'url' => 'admin/counter',
|
||||||
'icon' => 'ri-add-circle-line',
|
'icon' => 'ri-add-circle-fill text-info',
|
||||||
'module' => 'CCMS',
|
'module' => 'CCMS',
|
||||||
'can' => ['counter.index'],
|
'can' => ['counter.index'],
|
||||||
],
|
],
|
||||||
|
|
||||||
[
|
[
|
||||||
'text' => 'Page',
|
'text' => 'Pages',
|
||||||
'url' => 'admin/page',
|
'url' => 'admin/page',
|
||||||
'icon' => 'ri-pages-line',
|
'icon' => 'ri-pages-line text-dark',
|
||||||
'module' => 'CCMS',
|
'module' => 'CCMS',
|
||||||
'can' => ['page.index'],
|
'can' => ['page.index'],
|
||||||
],
|
],
|
||||||
@@ -72,7 +102,7 @@ return [
|
|||||||
[
|
[
|
||||||
'text' => 'Slider',
|
'text' => 'Slider',
|
||||||
'url' => 'admin/slider',
|
'url' => 'admin/slider',
|
||||||
'icon' => 'ri-slideshow-3-line',
|
'icon' => 'ri-slideshow-3-fill text-warning',
|
||||||
'module' => 'CCMS',
|
'module' => 'CCMS',
|
||||||
'can' => ['slider.index'],
|
'can' => ['slider.index'],
|
||||||
],
|
],
|
||||||
@@ -80,7 +110,7 @@ return [
|
|||||||
[
|
[
|
||||||
'text' => 'Testimonial',
|
'text' => 'Testimonial',
|
||||||
'url' => 'admin/testimonial',
|
'url' => 'admin/testimonial',
|
||||||
'icon' => 'ri-feedback-line',
|
'icon' => 'ri-feedback-fill text-success',
|
||||||
'module' => 'CCMS',
|
'module' => 'CCMS',
|
||||||
'can' => ['testimonial.index'],
|
'can' => ['testimonial.index'],
|
||||||
],
|
],
|
||||||
@@ -88,7 +118,7 @@ return [
|
|||||||
[
|
[
|
||||||
'text' => 'Partner',
|
'text' => 'Partner',
|
||||||
'url' => 'admin/partner',
|
'url' => 'admin/partner',
|
||||||
'icon' => 'ri-hand-heart-line',
|
'icon' => 'ri-hand-heart-fill text-danger',
|
||||||
'module' => 'CCMS',
|
'module' => 'CCMS',
|
||||||
'can' => ['partner.index'],
|
'can' => ['partner.index'],
|
||||||
],
|
],
|
||||||
@@ -96,40 +126,46 @@ return [
|
|||||||
[
|
[
|
||||||
'text' => 'Service',
|
'text' => 'Service',
|
||||||
'url' => 'admin/service',
|
'url' => 'admin/service',
|
||||||
'icon' => 'ri-customer-service-2-line',
|
'icon' => 'ri-customer-service-2-fill text-success',
|
||||||
'module' => 'CCMS',
|
'module' => 'CCMS',
|
||||||
'can' => ['service.index'],
|
'can' => ['service.index'],
|
||||||
],
|
],
|
||||||
|
|
||||||
|
[
|
||||||
|
'text' => 'Events',
|
||||||
|
'url' => 'admin/event',
|
||||||
|
'icon' => 'ri-calendar-todo-fill text-primary',
|
||||||
|
'module' => 'CCMS',
|
||||||
|
'can' => ['event.index'],
|
||||||
|
],
|
||||||
|
|
||||||
[
|
[
|
||||||
'text' => 'Team',
|
'text' => 'Team',
|
||||||
'url' => 'admin/team',
|
'url' => 'admin/team',
|
||||||
'icon' => 'ri-team-line',
|
'icon' => 'ri-team-fill text-primary',
|
||||||
'module' => 'CCMS',
|
'module' => 'CCMS',
|
||||||
'can' => ['team.index'],
|
'can' => ['team.index'],
|
||||||
],
|
],
|
||||||
|
|
||||||
[
|
[
|
||||||
'text' => 'Blog',
|
'text' => 'Career',
|
||||||
'icon' => 'ri-newspaper-line',
|
'url' => 'admin/career',
|
||||||
|
'icon' => 'ri-suitcase-fill text-danger',
|
||||||
'module' => 'CCMS',
|
'module' => 'CCMS',
|
||||||
'submenu' => [
|
'can' => ['career.index'],
|
||||||
[
|
|
||||||
'url' => 'admin/category',
|
|
||||||
'text' => 'Blog Category',
|
|
||||||
'can' => ['category.index'],
|
|
||||||
],
|
],
|
||||||
|
|
||||||
[
|
[
|
||||||
'url' => 'admin/blog',
|
|
||||||
'text' => 'Blog',
|
'text' => 'Blog',
|
||||||
|
'url' => 'admin/blog',
|
||||||
|
'icon' => 'ri-newspaper-fill text-dark',
|
||||||
|
'module' => 'CCMS',
|
||||||
'can' => ['blog.index'],
|
'can' => ['blog.index'],
|
||||||
],
|
],
|
||||||
],
|
|
||||||
],
|
|
||||||
|
|
||||||
[
|
[
|
||||||
'text' => 'Study Abroad',
|
'text' => 'Study Abroad',
|
||||||
'icon' => 'ri-earth-line',
|
'icon' => 'ri-earth-fill text-success',
|
||||||
'module' => 'CCMS',
|
'module' => 'CCMS',
|
||||||
'submenu' => [
|
'submenu' => [
|
||||||
[
|
[
|
||||||
@@ -147,7 +183,7 @@ return [
|
|||||||
|
|
||||||
[
|
[
|
||||||
'text' => 'Testimonial Videos',
|
'text' => 'Testimonial Videos',
|
||||||
'icon' => ' ri-camera-line',
|
'icon' => ' ri-camera-fill text-dark',
|
||||||
'module' => 'CCMS',
|
'module' => 'CCMS',
|
||||||
'submenu' => [
|
'submenu' => [
|
||||||
[
|
[
|
||||||
@@ -165,7 +201,7 @@ return [
|
|||||||
|
|
||||||
[
|
[
|
||||||
'text' => 'FAQ',
|
'text' => 'FAQ',
|
||||||
'icon' => 'ri-questionnaire-line',
|
'icon' => 'ri-questionnaire-fill text-danger',
|
||||||
'module' => 'CCMS',
|
'module' => 'CCMS',
|
||||||
'submenu' => [
|
'submenu' => [
|
||||||
[
|
[
|
||||||
@@ -181,25 +217,11 @@ return [
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
[
|
|
||||||
'text' => 'Enquiry',
|
|
||||||
'url' => 'admin/enquiry',
|
|
||||||
'icon' => ' ri-cellphone-line',
|
|
||||||
'module' => 'CCMS',
|
|
||||||
'can' => ['enquiry.index'],
|
|
||||||
],
|
|
||||||
|
|
||||||
[
|
|
||||||
'text' => 'Counsellor Request',
|
|
||||||
'url' => 'admin/counselor',
|
|
||||||
'icon' => ' ri-cellphone-line',
|
|
||||||
'module' => 'CCMS',
|
|
||||||
'can' => ['counselor.index'],
|
|
||||||
],
|
|
||||||
|
|
||||||
[
|
[
|
||||||
'text' => 'Course Finder',
|
'text' => 'Course Finder',
|
||||||
'icon' => 'ri-book-2-line',
|
'icon' => 'ri-book-2-fill text-primary',
|
||||||
'module' => 'CourseFinder',
|
'module' => 'CourseFinder',
|
||||||
'submenu' => [
|
'submenu' => [
|
||||||
|
|
||||||
@@ -236,7 +258,7 @@ return [
|
|||||||
|
|
||||||
[
|
[
|
||||||
'text' => 'Cost Calculator',
|
'text' => 'Cost Calculator',
|
||||||
'icon' => 'ri-newspaper-line',
|
'icon' => 'ri-calculator-line text-primary',
|
||||||
'module' => 'CostCalculator',
|
'module' => 'CostCalculator',
|
||||||
'submenu' => [
|
'submenu' => [
|
||||||
[
|
[
|
||||||
@@ -255,15 +277,16 @@ return [
|
|||||||
[
|
[
|
||||||
'text' => 'Free Resources',
|
'text' => 'Free Resources',
|
||||||
'url' => 'admin/documents',
|
'url' => 'admin/documents',
|
||||||
'icon' => 'ri-file-text-line',
|
'icon' => 'ri-file-upload-fill text-dark',
|
||||||
'module' => 'Document',
|
'module' => 'Document',
|
||||||
'can' => ['documents.index'],
|
'can' => ['documents.index'],
|
||||||
],
|
],
|
||||||
|
|
||||||
[
|
[
|
||||||
'text' => 'Resume Builder',
|
'text' => 'Template',
|
||||||
'url' => 'admin/resume',
|
'url' => 'admin/template',
|
||||||
'icon' => 'ri-pages-line',
|
'icon' => 'ri-mail-send-fill text-info',
|
||||||
'module' => 'CCMS',
|
'module' => 'Template',
|
||||||
'can' => ['resume.index'],
|
'can' => ['template.index'],
|
||||||
],
|
]
|
||||||
];
|
];
|
||||||
|
@@ -18,5 +18,6 @@
|
|||||||
"Drive": true,
|
"Drive": true,
|
||||||
"Sitemap": true,
|
"Sitemap": true,
|
||||||
"Document": true,
|
"Document": true,
|
||||||
"CostCalculator": true
|
"CostCalculator": true,
|
||||||
|
"Chatbot": true
|
||||||
}
|
}
|
4993
public/assets/css/app.min.css
vendored
4993
public/assets/css/app.min.css
vendored
File diff suppressed because it is too large
Load Diff
172
public/assets/css/custom.min.css
vendored
172
public/assets/css/custom.min.css
vendored
@@ -1,4 +1,17 @@
|
|||||||
.dropify-message p {
|
a {
|
||||||
|
text-decoration: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control {
|
||||||
|
background-color: #ffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-label {
|
||||||
|
font-size: 12px;
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* .dropify-message p {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7,147 +20,26 @@ legend {
|
|||||||
all: revert;
|
all: revert;
|
||||||
}
|
}
|
||||||
|
|
||||||
.upload__box {
|
.dropify-wrapper {
|
||||||
padding: 5px;
|
height: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.upload__btn-box {
|
|
||||||
margin-bottom: 10px;
|
fieldset.scheduler-border {
|
||||||
|
border: 1px groove #ddd !important;
|
||||||
|
padding: 0 1.4em 1.4em 1.4em !important;
|
||||||
|
-webkit-box-shadow: 0px 0px 0px 0px #000;
|
||||||
|
box-shadow: 0px 0px 0px 0px #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.upload__img-wrap {
|
legend.scheduler-border {
|
||||||
display: flex;
|
font-size: 1.2em !important;
|
||||||
flex-wrap: wrap;
|
font-weight: semibold !important;
|
||||||
}
|
text-align: left !important;
|
||||||
|
width: auto;
|
||||||
.upload__img-box {
|
padding: 0 10px;
|
||||||
width: 125px;
|
border-bottom: none;
|
||||||
margin-bottom: 12px;
|
margin-top: -15px;
|
||||||
}
|
|
||||||
|
|
||||||
.upload__img-close {
|
|
||||||
width: 24px;
|
|
||||||
height: 24px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background-color: rgba(0, 0, 0, 0.5);
|
|
||||||
position: absolute;
|
|
||||||
top: 10px;
|
|
||||||
right: 10px;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 24px;
|
|
||||||
z-index: 1;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.upload__img-close:after {
|
|
||||||
content: "\2716";
|
|
||||||
font-size: 14px;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.img-bg {
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-position: center;
|
|
||||||
background-size: cover;
|
|
||||||
position: relative;
|
|
||||||
padding-bottom: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dark-login {
|
|
||||||
height: 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.light-login {
|
|
||||||
height: 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fl-wrapper {
|
|
||||||
z-index: 99999;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-switch {
|
|
||||||
position: relative;
|
|
||||||
display: inline-block;
|
|
||||||
width: 90px;
|
|
||||||
height: 34px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-switch input {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-switch .slider {
|
|
||||||
position: absolute;
|
|
||||||
cursor: pointer;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
background-color: #ca2222;
|
|
||||||
-webkit-transition: 0.4s;
|
|
||||||
transition: 0.4s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-switch .slider:before {
|
|
||||||
position: absolute;
|
|
||||||
content: "";
|
|
||||||
height: 26px;
|
|
||||||
width: 26px;
|
|
||||||
left: 4px;
|
|
||||||
bottom: 4px;
|
|
||||||
background-color: white;
|
background-color: white;
|
||||||
-webkit-transition: 0.4s;
|
color: black;
|
||||||
transition: 0.4s;
|
} */
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-switch input:checked + .slider {
|
|
||||||
background-color: #2ab934;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-switch input:focus + .slider {
|
|
||||||
box-shadow: 0 0 1px #2196f3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-switch input:checked + .slider:before {
|
|
||||||
-webkit-transform: translateX(55px);
|
|
||||||
-ms-transform: translateX(55px);
|
|
||||||
transform: translateX(55px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-switch .on {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-switch .on,
|
|
||||||
.dashboard-switch .off {
|
|
||||||
color: white;
|
|
||||||
position: absolute;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
top: 50%;
|
|
||||||
font-size: 12px;
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-switch .on{
|
|
||||||
left: 40%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-switch .off{
|
|
||||||
right: 10% !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-switch input:checked + .slider .on {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-switch input:checked + .slider .off {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-switch .slider.round {
|
|
||||||
border-radius: 34px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-switch .slider.round:before {
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
@@ -37,6 +37,10 @@ body {
|
|||||||
font-family: 'Outfit', sans-serif;
|
font-family: 'Outfit', sans-serif;
|
||||||
/* font-weight: normal; */
|
/* font-weight: normal; */
|
||||||
}
|
}
|
||||||
|
p{
|
||||||
|
font-size: 16px;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.text-brand{
|
.text-brand{
|
||||||
@@ -614,13 +618,13 @@ z-index: 10000;
|
|||||||
transition: .3s all ease-in-out;
|
transition: .3s all ease-in-out;
|
||||||
}
|
}
|
||||||
.col.col-md-3:nth-child(1) .course-box img, .col.col-md-3:nth-child(2) .course-box img{
|
.col.col-md-3:nth-child(1) .course-box img, .col.col-md-3:nth-child(2) .course-box img{
|
||||||
width: 100%;
|
width: 100px;
|
||||||
}
|
}
|
||||||
.col.col-md-3:nth-child(4) .course-box img {
|
.col.col-md-3:nth-child(3) .course-box img {
|
||||||
width: 125px;
|
width: 125px;
|
||||||
}
|
}
|
||||||
.col.col-md-3:nth-child(4) .course-box img {
|
.col.col-md-3:nth-child(4) .course-box img {
|
||||||
width: 120px;
|
width: 110px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.how-it-work input, .how-it-work textarea {
|
.how-it-work input, .how-it-work textarea {
|
||||||
|
@@ -424,6 +424,9 @@ color: white;
|
|||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.mySwiper-text .swiper-slide .box img{
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.mySwiper-text .swiper-button-next::after, .mySwiper-text .swiper-button-prev::after{
|
.mySwiper-text .swiper-button-next::after, .mySwiper-text .swiper-button-prev::after{
|
||||||
|
BIN
public/raffles/assets/images/404/404.png
Normal file
BIN
public/raffles/assets/images/404/404.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 267 KiB |
@@ -1,12 +1,17 @@
|
|||||||
<!DOCTYPE html>
|
@extends('client.raffles.layouts.app')
|
||||||
<html lang="en">
|
|
||||||
<head>
|
@section('content')
|
||||||
<meta charset="UTF-8">
|
<div
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
class="min-h-screen flex flex-col items-center justify-center bg-gradient-to-b from-yellow-100 via-white to-yellow-50 px-6">
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<!-- Monkey Illustration -->
|
||||||
<title>Document</title>
|
<div class="relative">
|
||||||
</head>
|
<img src="{{ asset('raffles/assets/images/404/404.png') }}" alt="Monkey" class="animate-bounce" height="500px"
|
||||||
<body>
|
width="700px">
|
||||||
<h1>404</h1>
|
</div>
|
||||||
</body>
|
<!-- Button -->
|
||||||
</html>
|
<a href="{{ url('/') }}"
|
||||||
|
class="mt-6 inline-block bg-yellow-400 text-gray-900 font-semibold px-6 py-3 rounded-2xl shadow-md hover:bg-yellow-500 transition duration-300">
|
||||||
|
🏠 Back to Home
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user