Compare commits

..

No commits in common. '564529895f16565984e00dd3b976738ef796476c' and 'f860a3694761658a89cdbf3a341655ff58f67a20' have entirely different histories.

  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. 45
      app/Http/Controllers/AppointmentController.php
  6. 2
      app/Http/Controllers/BlogController.php
  7. 1
      app/Http/Controllers/EnquiryController.php
  8. 9
      app/Http/Controllers/HomeController.php
  9. 1
      resources/views/appointment_confirmed.blade.php
  10. 25
      resources/views/appointment_confirmed_for_admin.blade.php
  11. 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) 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', 'date' => 'required|date',
'start_time' => 'required|date_format:H:i', 'start_time' => 'required|date_format:H:i',
'end_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'); $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'); $end_time = Carbon::createFromFormat('H:i', $request->get('end_time'))->format('H:i A');
$appointment = new Appointment([ $appointment = new Appointment([
'date' => $request->get('date'), 'date' => $request->get('date'),
'start_time' => $start_time, 'start_time' => $start_time,
@ -87,13 +88,8 @@ class AppointmentController extends Controller
]); ]);
$appointment->save(); $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) public function edit($id)
@ -111,11 +107,12 @@ class AppointmentController extends Controller
public function update(Request $request, $id) public function update(Request $request, $id)
{ {
$request->validate([ $request->validate([
'date' => 'required|date', 'date' => 'required|date',
'start_time' => 'required|date_format:H:i', 'start_time' => 'required|date_format:H:i',
'end_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'); $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'); $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->service_type = $request->get('service_type');
$appointment->status = $request->get('status'); $appointment->status = $request->get('status');
$appointment->save(); $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) public function show($id)

@ -75,7 +75,7 @@ class AppointmentController extends Controller
$formated_date = $date->format('M d, Y'); $formated_date = $date->format('M d, Y');
$appointment->is_booked = true; $appointment->is_booked = true;
$appointment->save(); $appointment->save();
$subject = 'Appointment Booked Successfully.'; $subject = 'Appointment Confirmed';
dispatch(function() use ($name,$email,$phone,$subject,$formated_date,$appointment) { dispatch(function() use ($name,$email,$phone,$subject,$formated_date,$appointment) {
\Mail::send('appointment_confirmed', array( \Mail::send('appointment_confirmed', array(
@ -96,46 +96,13 @@ class AppointmentController extends Controller
), function($message) use ($subject,$email,$name){ ), function($message) use ($subject,$email,$name){
// $subject=($service!= '') ? 'Enquiry for '.$service : 'Contact/Feedback'; // $subject=($service!= '') ? 'Enquiry for '.$service : 'Contact/Feedback';
$message->subject($subject); $message->subject($subject);
// $message->from('admin@eteducation.com.au', 'Admin'); $message->to($email, $name)->subject($subject);
$message->to($email, $name)->subject($subject); // $message->cc('extratechweb@gmail.com', 'Extratech')->subject($subject);
// $message->cc('extratechweb@gmail.com', 'Extratech')->subject($subject); // $message->cc('suman@extratechs.com.au', 'Extratech')->subject($subject);
// $message->cc('admin@eteducation.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 class BlogController extends Controller
{ {
public function index(){ 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(); $blogs = NewsAndUpdate::where('status',1)->get();
return view('blogs',compact('blogs','page')); return view('blogs',compact('blogs','page'));
} }

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

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

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

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

Loading…
Cancel
Save