quick-enquiry-section-and-header-footer-update

aplus/#5
Mahesh Sharma 2 years ago
parent 320e3aa0ba
commit cdef2abe1d
  1. 13
      app/Http/Controllers/Admin/SliderController.php
  2. 22
      app/Http/Controllers/HomeController.php
  3. 36
      database/migrations/2022_09_20_184931_create_jobs_table.php
  4. 4
      resources/views/admin/slider/create.blade.php
  5. 4
      resources/views/admin/slider/edit.blade.php
  6. 11
      resources/views/admin/slider/index.blade.php
  7. 29
      resources/views/contact_mail.blade.php
  8. 27
      resources/views/layout/app.blade.php
  9. 58
      resources/views/welcome.blade.php
  10. 2
      routes/web.php

@ -54,9 +54,9 @@ class SliderController extends Controller
{ {
$this->validate(\request(),[ $this->validate(\request(),[
'title1' => 'required', 'title1' => 'required',
// 'title2' => 'required', 'title2' => 'required',
// 'description' => 'required', 'description' => 'required',
'image' => 'required|file|mimes:jpeg,png,jpg', // 'image' => 'required|file|mimes:jpeg,png,jpg',
'status' => 'required' 'status' => 'required'
]); ]);
@ -121,10 +121,9 @@ class SliderController extends Controller
$this->validate(\request(),[ $this->validate(\request(),[
'title1' => 'required', 'title1' => 'required',
// 'title1' => 'required', 'title2' => 'required',
// 'title2' => 'required', 'description' => 'required',
// 'description' => 'required', // 'image' => 'file|mimes:jpeg,png,jpg',
'image' => 'file|mimes:jpeg,png,jpg',
'status' => 'required' 'status' => 'required'
]); ]);

@ -74,7 +74,7 @@ class HomeController extends Controller
public function send_contact_mail(Request $request){ public function send_contact_mail(Request $request){
$contact = new Contact(); $contact = new Contact();
$subject = 'Contact Enquiry'; $subject = 'Quick Enquiry';
$check = ''; $check = '';
if(isset($request['firstname'])){ if(isset($request['firstname'])){
$subject = 'Quick Enquiry'; $subject = 'Quick Enquiry';
@ -87,14 +87,14 @@ class HomeController extends Controller
$contact->phone = $request['phone']; $contact->phone = $request['phone'];
$contact->message = $request['message']; $contact->message = $request['message'];
$service = '';
// if($request->service_id != null){ if($request->service_id != null){
// $service = Service::find($request['service_id'])->name ; $service = Service::find($request['service_id'])->name ;
// $contact->service_id = $request['service_id']; $contact->service_id = $request['service_id'];
// } }
$contact->save(); $contact->save();
dispatch(function() use ($check,$subject, $contact) { dispatch(function() use ($check,$subject, $contact,$service) {
\Mail::send('contact_mail', array( \Mail::send('contact_mail', array(
'full_name' =>$contact['fullname'], 'full_name' =>$contact['fullname'],
@ -107,7 +107,9 @@ class HomeController extends Controller
'subject' =>$subject , 'subject' =>$subject ,
'check' => $check ?? '' 'check' => $check ?? '',
'service' => $service ?? ''
), function($message) use ($subject){ ), function($message) use ($subject){
// $subject=($service!= '') ? 'Enquiry for '.$service : 'Contact/Feedback'; // $subject=($service!= '') ? 'Enquiry for '.$service : 'Contact/Feedback';
@ -118,8 +120,8 @@ class HomeController extends Controller
}); });
}); });
return redirect()->back()->with(['success' => 'Thank you for your interest. We will get back to you soon.']);
return response()->json(['success' => 'Thank you for your interest. We will get back to you soon.','status' =>'Ok'],200); // return response()->json(['success' => 'Thank you for your interest. We will get back to you soon.','status' =>'Ok'],200);
} }

@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateJobsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('jobs', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('queue')->index();
$table->longText('payload');
$table->unsignedTinyInteger('attempts');
$table->unsignedInteger('reserved_at')->nullable();
$table->unsignedInteger('available_at');
$table->unsignedInteger('created_at');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('jobs');
}
}

@ -43,7 +43,7 @@
<div class="col-md-6"> <!-- <div class="col-md-6">
<div class="form-group"> <div class="form-group">
<label>Image</label> <label>Image</label>
<input type="file" class="form-control" name="image" required> <input type="file" class="form-control" name="image" required>
@ -54,7 +54,7 @@
<label>Image Alt</label> <label>Image Alt</label>
<input type="text" class="form-control" name="image_alt" > <input type="text" class="form-control" name="image_alt" >
</div> </div>
</div> </div> -->
<div class="col-md-12" > <div class="col-md-12" >

@ -49,7 +49,7 @@
</div> </div>
<div class="col-md-4"> <!-- <div class="col-md-4">
<div class="form-group"> <div class="form-group">
<label>Image</label> <label>Image</label>
<input type="file" class="form-control" name="image" > <input type="file" class="form-control" name="image" >
@ -60,7 +60,7 @@
<label>Image Alt</label> <label>Image Alt</label>
<input type="text" class="form-control" name="image_alt" value="{{$setting->image_alt}}"> <input type="text" class="form-control" name="image_alt" value="{{$setting->image_alt}}">
</div> </div>
</div> </div> -->
<div class="col-md-4"> <div class="col-md-4">
<div class="form-group"> <div class="form-group">

@ -55,8 +55,8 @@
<th scope="col" class="text-center">Header</th> <th scope="col" class="text-center">Header</th>
<th scope="col" class="text-center">Subheader</th> <th scope="col" class="text-center">Subheader</th>
<th scope="col" class="text-center">Description</th> <th scope="col" class="text-center">Description</th>
<th scope="col" class="text-center">Image</th> <!-- <th scope="col" class="text-center">Image</th>
<th scope="col" class="text-center">ImageAlt</th> <th scope="col" class="text-center">ImageAlt</th> -->
<th scope="col" class="text-center">Status</th> <th scope="col" class="text-center">Status</th>
<th scope="col" class="text-center">Action</th> <th scope="col" class="text-center">Action</th>
</tr> </tr>
@ -68,12 +68,7 @@
<td class="text-center">{{$setting->title1}}</td> <td class="text-center">{{$setting->title1}}</td>
<td class="text-center">{{$setting->title2}}</td> <td class="text-center">{{$setting->title2}}</td>
<td class="text-center">{!! $setting->description !!}</td> <td class="text-center">{!! $setting->description !!}</td>
<td class="text-center">
<a href="{{url($setting->image)}}" target="_blank">
<img src="{{url($setting->image)}}" alt="" style="width: 100px;">
</a>
</td>
<td class="text-center">{{$setting->image_alt}}</td>
<td class="text-center">{{config('custom.status')[$setting->status]}}</td> <td class="text-center">{{config('custom.status')[$setting->status]}}</td>
<td class="action-icons d-flex justify-content-center"> <td class="action-icons d-flex justify-content-center">
<a href="{{url('admin/sliders/'.$setting->id.'/edit')}}" class="btn btn-sm" data-bs-toggle="tooltip" data-bs-placement="top" title="edit"> <a href="{{url('admin/sliders/'.$setting->id.'/edit')}}" class="btn btn-sm" data-bs-toggle="tooltip" data-bs-placement="top" title="edit">

@ -0,0 +1,29 @@
<style>
.main-column{
display:flex;
width:100%;
}
.column-one{
width:50%;
}
</style>
<h1>@if($check !== '') Contact Details @else Quick Enquiry Details @endif </h1>
<br />
<div class="main-column" style = "display:block; width:100%;">
<div class="column-one" style = "display:block; width:100%;">
<h3>Please, find out the @if(($check !== '')) contact @else quick enquiry @endif details</h3>
<b>Full Name:</b> {{ $full_name }}<br /><br />
<b>Email:</b> {{ $email }}<br /><br />
<b>Phone:</b> {{$phone}}<br /><br />
@if($service !== '')
<b>Service:</b> {{$service}}<br /><br />
@endif
<b>Message:</b> {{ $contact_message }}<br /><br />
</div>
</div>

@ -58,16 +58,28 @@
<li class="nav-item"> <li class="nav-item">
<a class="nav-link pr-0" href="{{url('/contact')}}">Contact</a> <a class="nav-link pr-0" href="{{url('/contact')}}">Contact</a>
</li> </li>
@php
$services = \App\Models\Service::where('status','1')->orderByRaw('CONVERT(order_by, SIGNED) asc')->get();
$facebook = App\Models\Setting::where(['slug' => 'facebook-link','status' => true])->first();
$instagram = App\Models\Setting::where(['slug' => 'instagram-link','status' => true])->first();
$linkedIn = App\Models\Setting::where(['slug' => 'linkedin-link','status' => true])->first();
@endphp
<li class="nav-socials"> <li class="nav-socials">
<a href="" target="_blank"> @if(!is_null($facebook))
<a href="{{$facebook->value}}" target="_blank">
<img src="{{url('frontend/icons/facebook.svg')}}" alt=""> <img src="{{url('frontend/icons/facebook.svg')}}" alt="">
</a> </a>
<a href="" target="_blank"> @endif
@if(!is_null($instagram))
<a href="{{$instagram->value}}" target="_blank">
<img src="{{url('frontend/icons/instagram.svg')}}" alt=""> <img src="{{url('frontend/icons/instagram.svg')}}" alt="">
</a> </a>
<a href="" target="_blank"> @endif
@if(!is_null($linkedIn))
<a href="{{$linkedIn->value}}" target="_blank">
<img src="{{url('frontend/icons/linkedIn.svg')}}" alt=""> <img src="{{url('frontend/icons/linkedIn.svg')}}" alt="">
</a> </a>
@endif
</li> </li>
</ul> </ul>
<div class="mobile-navbar-btn ms-auto"> <div class="mobile-navbar-btn ms-auto">
@ -91,11 +103,10 @@
<div class="visa-services"> <div class="visa-services">
<h2>Visa Services</h2> <h2>Visa Services</h2>
<ul> <ul>
<li><a href="">Temporary Work Visa</a></li> @foreach($services as $service)
<li><a href="">Permanent Work Visas</a></li> <li><a href="{{url('/service/'.$service->slug)}}">{{$service->name}}</a></li>
<li><a href="">Temporary Independent</a></li> @endforeach
<li><a href="">Permanent Independent Visa</a></li>
<li><a href="">Work and Holiday Visa</a></li>
</ul> </ul>
</div> </div>
</div> </div>

@ -3,6 +3,9 @@
<title>Aplus Agency</title> <title>Aplus Agency</title>
@endsection @endsection
@section('content') @section('content')
@php
$msg = Session::get('msg') ?? null;
@endphp
<!-- Slider section --> <!-- Slider section -->
<section class="banner-section"> <section class="banner-section">
<video width="100%" height="auto" id="vid" autoplay playsinline loop muted> <video width="100%" height="auto" id="vid" autoplay playsinline loop muted>
@ -249,18 +252,24 @@
<h2>Let’s Start a Conversation</h2> <h2>Let’s Start a Conversation</h2>
<p>We’d love to hear from you. Our friendly support team is always here to assist you. </p> <p>We’d love to hear from you. Our friendly support team is always here to assist you. </p>
<div class="contact-desc"> <div class="contact-desc">
<a href="tel: +61 - 047 817 7809" class="contact-phone"> @if(!is_null($phone))
<img src="{{url('frontend/icons/phone-Icon.svg')}}" alt=""> <a href="tel: {{$phone->value}}" class="contact-phone">
<h5>+61 - 047 817 7809</h5> <img src="{{url('frontend/icons/phone-Icon.svg')}}" alt="">
</a> <h5>{{$phone->value}}</h5>
<a href="mailto: info@aplusagency.com.au" class="contact-phone"> </a>
<img src="{{url('frontend/icons/email-Icon.svg')}}" alt=""> @endif
<h5>info@aplusagency.com.au</h5> @if(!is_null($email))
</a> <a href="mailto: {{$email->value}}" class="contact-phone">
<img src="{{url('frontend/icons/email-Icon.svg')}}" alt="">
<h5>{{$email->value}}</h5>
</a>
@endif
@if(!is_null($address))
<a href="https://goo.gl/maps/P4Y2PYGMpGa83L2R8" target="_blank" class="contact-phone"> <a href="https://goo.gl/maps/P4Y2PYGMpGa83L2R8" target="_blank" class="contact-phone">
<img src="{{url('frontend/icons/location-Icon.svg')}}" alt=""> <img src="{{url('frontend/icons/location-Icon.svg')}}" alt="">
<h5>Suite 503, Level 5, 368 Sussex Street Sydney, NSW 2000</h5> <h5>{{$address->value}}</h5>
</a> </a>
@endif
</div> </div>
</div> </div>
</div> </div>
@ -269,7 +278,8 @@
<h2>Quick Enquiry</h2> <h2>Quick Enquiry</h2>
<p>Want to get in touch? Please fill in the form below and one of our agents will be in touch with you shortly. </p> <p>Want to get in touch? Please fill in the form below and one of our agents will be in touch with you shortly. </p>
</div> </div>
<form action=""> <form action="{{route('send_contact_mail')}}" method="post">
@csrf
<div class="row enquiry-form"> <div class="row enquiry-form">
<div class="col-md-6"> <div class="col-md-6">
<div class="input-group mb-3"> <div class="input-group mb-3">
@ -278,7 +288,7 @@
<img src="{{url('frontend/icons/user-icon.svg')}}" alt=""> <img src="{{url('frontend/icons/user-icon.svg')}}" alt="">
</span> </span>
</div> </div>
<input type="text" class="form-control" placeholder="Full Name" aria-label="Fullname" aria-describedby="basic-addon1"> <input type="text" name = "fullname" class="form-control" placeholder="Full Name" aria-label="Fullname" aria-describedby="basic-addon1">
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
@ -288,7 +298,7 @@
<img src="{{url('frontend/icons/email-icon.svg')}}" alt=""> <img src="{{url('frontend/icons/email-icon.svg')}}" alt="">
</span> </span>
</div> </div>
<input type="email" class="form-control" placeholder="Email" aria-label="Email" aria-describedby="basic-addon1"> <input type="email" name = "email" class="form-control" placeholder="Email" aria-label="Email" aria-describedby="basic-addon1">
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
@ -298,7 +308,7 @@
<i class="fa-solid fa-phone"></i> <i class="fa-solid fa-phone"></i>
</span> </span>
</div> </div>
<input type="text" class="form-control" placeholder="Phone" aria-label="Phone" aria-describedby="basic-addon1"> <input type="text" name = "phone" class="form-control" placeholder="Phone" aria-label="Phone" aria-describedby="basic-addon1">
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
@ -308,11 +318,13 @@
<img src="{{url('frontend/icons/layers_light.svg')}}" alt=""> <img src="{{url('frontend/icons/layers_light.svg')}}" alt="">
</label> </label>
</div> </div>
<select class="form-select" id="inputGroupSelect01"> <select class="form-select" id="inputGroupSelect01" name = "service_id">
<option hidden>Choose Services</option> <option hidden>Choose Services</option>
<option value="1">One</option> @foreach($services as $service)
<option value="2">Two</option> <option value="{{$service->id}}">
<option value="3">Three</option> {{$service->name}}
</option>
@endforeach
</select> </select>
</div> </div>
</div> </div>
@ -340,6 +352,8 @@
@endsection @endsection
@section('script') @section('script')
<script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script> <script>
$(document).ready(function(){ $(document).ready(function(){
$('.slider-partners').slick({ $('.slider-partners').slick({
@ -356,5 +370,15 @@
dots: true dots: true
}) })
}); });
var php_var = "<?php echo $msg; ?>";
if(php_var.length !== 0){
alert('ok');
Swal.fire({
title: 'Submitted!!',
text: php_var,
icon: 'success'
})
}
</script> </script>
@endsection @endsection

@ -58,7 +58,7 @@ Route::get('/career', [HomeController::class, 'working_dice']);
Route::post('/career', [HomeController::class, 'save_career'])->name('career'); Route::post('/career', [HomeController::class, 'save_career'])->name('career');
Route::get('/service/{slug}', [FrontendServiceController::class,'single_service']); Route::get('/service/{slug}', [FrontendServiceController::class,'single_service']);
Route::post('/contact_mail', [HomeController::class, 'send_contact_mail']); Route::post('/contact_mail', [HomeController::class, 'send_contact_mail'])->name('send_contact_mail');
Route::post('/subscribe', [HomeController::class, 'subscribe']); Route::post('/subscribe', [HomeController::class, 'subscribe']);
Route::get('/ndis', function(){ Route::get('/ndis', function(){
return view('ndis'); return view('ndis');

Loading…
Cancel
Save