Compare commits

..

1 Commits

  1. 36
      app/Console/Commands/CheckQueue.php
  2. 33
      app/Console/Commands/ProcessQueue.php
  3. 2
      app/Console/Kernel.php
  4. 20
      app/Http/Controllers/Admin/AppointmentController.php
  5. 11
      app/Http/Controllers/Admin/HomeController.php
  6. 45
      app/Http/Controllers/AppointmentController.php
  7. 2
      app/Http/Controllers/BlogController.php
  8. 1
      app/Http/Controllers/EnquiryController.php
  9. 9
      app/Http/Controllers/HomeController.php
  10. 37
      resources/views/admin/index.blade.php
  11. 1
      resources/views/appointment_confirmed.blade.php
  12. 25
      resources/views/appointment_confirmed_for_admin.blade.php
  13. 2
      resources/views/blogs.blade.php
  14. 2
      resources/views/layout/app.blade.php

@ -1,36 +0,0 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Queue;
class CheckQueue extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'queue:check';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Check if there is a job in the queue';
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
$count = Queue::size(); // Get the number of jobs in the queue
if ($count > 0) {
$this->call('queue:process'); // Call the ProcessQueue command if there is a job in the queue
}
}
}

@ -1,33 +0,0 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Queue;
class ProcessQueue extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'queue:process';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Process the tasks in the queue';
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
Queue::daemon(); // Process the tasks in the queue
}
}

@ -15,7 +15,7 @@ class Kernel extends ConsoleKernel
*/
protected function schedule(Schedule $schedule)
{
$schedule->command('queue:check')->everyMinute();
// $schedule->command('inspire')->hourly();
}
/**

@ -73,10 +73,11 @@ class AppointmentController extends Controller
'date' => 'required|date',
'start_time' => 'required|date_format:H:i',
'end_time' => 'required|date_format:H:i',
// 'location' => 'required|max:255',
// 'description' => 'required',
]);
$start_time = Carbon::createFromFormat('H:i', $request->get('start_time'))->format('H:i A');
$end_time = Carbon::createFromFormat('H:i', $request->get('end_time'))->format('H:i A');
$appointment = new Appointment([
'date' => $request->get('date'),
'start_time' => $start_time,
@ -87,13 +88,8 @@ class AppointmentController extends Controller
]);
$appointment->save();
if($request->get('service_type') == "1"){
$service = 'education';
}else{
$service = 'visa';
}
return redirect($this->redirect.'/'.$service)->with('success', 'Appointment has been added');
return redirect($this->redirect)->with('success', 'Appointment has been added');
}
public function edit($id)
@ -111,11 +107,12 @@ class AppointmentController extends Controller
public function update(Request $request, $id)
{
$request->validate([
'date' => 'required|date',
'start_time' => 'required|date_format:H:i',
'end_time' => 'required|date_format:H:i',
// 'location' => 'required|max:255',
// 'description' => 'required',
]);
$start_time = Carbon::createFromFormat('H:i', $request->get('start_time'))->format('H:i A');
$end_time = Carbon::createFromFormat('H:i', $request->get('end_time'))->format('H:i A');
@ -129,13 +126,8 @@ class AppointmentController extends Controller
$appointment->service_type = $request->get('service_type');
$appointment->status = $request->get('status');
$appointment->save();
if($request->get('service_type') == "1"){
$service = 'education';
}else{
$service = 'visa';
}
return redirect($this->redirect.'/'.$service)->with('success', 'Appointment has been updated');
return redirect($this->redirect)->with('success', 'Appointment has been updated');
}
public function show($id)

@ -4,9 +4,8 @@ namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Models\Contact;
use App\Models\Enquiry;
use App\Models\Referral;
use App\Models\Subscription;
use App\Models\VisaService;
use App\Models\Service;
use Illuminate\Http\Request;
use Illuminate\Routing\Route;
@ -21,14 +20,12 @@ class HomeController extends Controller
public function indexAdmin()
{
if(Auth::check()){
$visa_service= VisaService::where('status',true);
$education_service= Service::where('status',true);
$enquiry= Enquiry::all();
$service= Service::where('status',true);
$contact= Contact::all();
$subscription= Subscription::all();
$subscription= Contact::all();
$contacts = Contact::paginate(config('custom.per_page'));
// $referrals=Referral::paginate(config('custom.per_page'));
return view('admin.index', compact( 'visa_service', 'education_service', 'enquiry', 'contacts','contact','subscription'));
return view('admin.index', compact( 'service', 'contact', 'contacts','subscription'));
}
return view('admin.login');
}

@ -75,7 +75,7 @@ class AppointmentController extends Controller
$formated_date = $date->format('M d, Y');
$appointment->is_booked = true;
$appointment->save();
$subject = 'Appointment Booked Successfully.';
$subject = 'Appointment Confirmed';
dispatch(function() use ($name,$email,$phone,$subject,$formated_date,$appointment) {
\Mail::send('appointment_confirmed', array(
@ -96,46 +96,13 @@ class AppointmentController extends Controller
), function($message) use ($subject,$email,$name){
// $subject=($service!= '') ? 'Enquiry for '.$service : 'Contact/Feedback';
$message->subject($subject);
// $message->from('admin@eteducation.com.au', 'Admin');
$message->to($email, $name)->subject($subject);
// $message->cc('extratechweb@gmail.com', 'Extratech')->subject($subject);
// $message->cc('admin@eteducation.com.au', 'Extratech')->subject($subject);
// $subject=($service!= '') ? 'Enquiry for '.$service : 'Contact/Feedback';
$message->subject($subject);
$message->to($email, $name)->subject($subject);
// $message->cc('extratechweb@gmail.com', 'Extratech')->subject($subject);
// $message->cc('suman@extratechs.com.au', 'Extratech')->subject($subject);
});
});
dispatch(function() use ($name,$email,$phone,$subject,$formated_date,$appointment) {
\Mail::send('appointment_confirmed_for_admin', array(
'full_name' =>$name,
'email' =>$email,
'date' => $formated_date,
'start_time' => $appointment['start_time'],
'end_time' => $appointment['end_time'],
'phone' =>$phone,
'subject' =>$subject
), function($message) use ($subject){
// $subject=($service!= '') ? 'Enquiry for '.$service : 'Contact/Feedback';
$message->subject($subject);
// $message->to($email, $name)->subject($subject);
$message->to('mahesh@extratechs.com.au', 'Extratech')->subject($subject);
// $message->cc('admin@eteducation.com.au', 'Extratech')->subject($subject);
});
});
}

@ -9,7 +9,7 @@ use App\Models\Page;
class BlogController extends Controller
{
public function index(){
$page = Page::where(['title' => 'Blogs','status' => 1])->first();
$page = Page::where(['title' => 'Blog','status' => 1])->first();
$blogs = NewsAndUpdate::where('status',1)->get();
return view('blogs',compact('blogs','page'));
}

@ -28,6 +28,7 @@ class EnquiryController extends Controller
}
$marital_status = $request->get('marital_status');
if ($marital_status == 'Widow' || $marital_status == 'Single') {
$request['married_date'] = null;
$request['spouse_academics'] = null;
$request['spouse_work_experience'] = null;

@ -18,16 +18,15 @@ class HomeController extends Controller
}
public function runQueueJobs(){
Artisan::call('queue:listen');
}
public function index(){
}
public function index(){
$sliders = Slider::where('status',1)->get();
$testimonials = Testimonial::where('status',1)->get();
$blogs = NewsAndUpdate::where('status',1)->get();
$about_us = AboutUs::where('status',1)->get();
return view('welcome',compact('sliders','testimonials','blogs','about_us'));
}
public function subscribe(Request $request)
}
public function subscribe(Request $request)
{
$email = $request->email;

@ -29,8 +29,8 @@
<!-- small box -->
<div class="small-box bg-info">
<div class="inner">
<h3>{{ $visa_service->count() }}</h3>
<p>Visa Service</p>
<h3>{{$service-> count()}}</h3>
<p>Service</p>
</div>
<div class="icon">
<i class="fa-solid fa-headset"></i>
@ -38,50 +38,49 @@
<a href="#" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
</div>
</div>
<!-- ./col -->
<div class="col-lg-3 col-6">
<!-- small box -->
<div class="small-box bg-info">
<div class="small-box bg-success">
<div class="inner">
<h3>{{ $education_service->count() }}</h3>
<p>Education Service</p>
<h3>2</h3>
<p>Total Number of Referral</p>
</div>
<div class="icon">
<i class="fa-solid fa-headset"></i>
<i class="fa-solid fa-user-group"></i>
</div>
<a href="#" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
<a href="referrals" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
</div>
</div>
<!-- ./col -->
<div class="col-lg-3 col-6">
<!-- small box -->
<div class="small-box bg-success">
<div class="small-box bg-warning">
<div class="inner">
<h3>{{ $enquiry->count() }}</h3>
<p>Total Number of Enquiries</p>
<h3>{{$contact -> count()}}</h3>
<p>Total Number of Contact</p>
</div>
<div class="icon">
<i class="fa-solid fa-user-group"></i>
<i class="fa-solid fa-address-book"></i>
</div>
<a href="enquiries" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
<a href="contacts" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
</div>
</div>
<!-- ./col -->
<div class="col-lg-3 col-6">
<!-- small box -->
<div class="small-box bg-warning">
<div class="small-box bg-danger">
<div class="inner">
<h3>{{$contact->count()}}</h3>
<p>Total Number of Contacts</p>
<h3>{{$subscription -> count()}}</h3>
<p>Number of Subscription</p>
</div>
<div class="icon">
<i class="fa-solid fa-address-book"></i>
<i class="fa-solid fa-hand-pointer"></i>
</div>
<a href="contacts" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
<a href="subscriptions" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
</div>
</div>
<!-- ./col -->
<!-- ./col -->
</div>
<!-- /.row -->
<!-- Main row -->

@ -19,7 +19,6 @@
<b>Appointment End Time:</b>{{$end_time}}<br /><br />
<b>Your Full Name:</b> {{ $full_name }}<br /><br />
<b>Phone:</b> {{$phone}}<br /><br />
</div>
</div>

@ -1,25 +0,0 @@
<style>
.main-column{
display:flex;
width:100%;
}
.column-one{
width:50%;
}
</style>
<h1>Appointment Confirmed</h1>
<br />
<div class="main-column" style = "display:block; width:100%;">
<div class="column-one" style = "display:block; width:100%;">
<h3>Appointment Details</h3>
<b>Appointment Date: </b>{{$date}}<br /><br />
<b>Appointment Start Time: </b>{{$start_time}}<br /><br />
<b>Appointment End Time: </b>{{$end_time}}<br /><br />
<b>Appointee Full Name: </b> {{ $full_name }}<br /><br />
<b>Phone:</b> {{$phone}}<br /><br />
<b>Email:</b> {{$email}}<br /><br />
</div>
</div>

@ -52,7 +52,7 @@
<h3 class="dinline mr-3">Study in Australia</h3>
<h6 class="dinline mr-3">{{$blog->publish_date}}</h6>
<h2>{{$blog->title}} </h2>
{!!(\Illuminate\Support\Str::limit($blog->description, 200, $end=''))!!}</p>
{!!(\Illuminate\Support\Str::limit($blog->description, 200, $end='...'))!!}</p>
<a href="{{url('/blog/'.$blog->slug)}}">Read More <i class="fa-solid fa-arrow-right-long ms-2 fa-xs"></i></a>
</div>
</div>

@ -115,7 +115,7 @@
</ul>
</li>
<li class="nav-item">
<a class="nav-link" href="{{url('/blogs')}}">BLOGS</a>
<a class="nav-link" href="{{url('/blogs')}}">BLOG</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{url('contact')}}">CONTACT</a>

Loading…
Cancel
Save