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. 50
      resources/views/welcome.blade.php
  10. 2
      routes/web.php

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

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

@ -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">
<label>Image</label>
<input type="file" class="form-control" name="image" required>
@ -54,7 +54,7 @@
<label>Image Alt</label>
<input type="text" class="form-control" name="image_alt" >
</div>
</div>
</div> -->
<div class="col-md-12" >

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

@ -55,8 +55,8 @@
<th scope="col" class="text-center">Header</th>
<th scope="col" class="text-center">Subheader</th>
<th scope="col" class="text-center">Description</th>
<th scope="col" class="text-center">Image</th>
<th scope="col" class="text-center">ImageAlt</th>
<!-- <th scope="col" class="text-center">Image</th>
<th scope="col" class="text-center">ImageAlt</th> -->
<th scope="col" class="text-center">Status</th>
<th scope="col" class="text-center">Action</th>
</tr>
@ -68,12 +68,7 @@
<td class="text-center">{{$setting->title1}}</td>
<td class="text-center">{{$setting->title2}}</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="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">

@ -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">
<a class="nav-link pr-0" href="{{url('/contact')}}">Contact</a>
</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">
<a href="" target="_blank">
@if(!is_null($facebook))
<a href="{{$facebook->value}}" target="_blank">
<img src="{{url('frontend/icons/facebook.svg')}}" alt="">
</a>
<a href="" target="_blank">
@endif
@if(!is_null($instagram))
<a href="{{$instagram->value}}" target="_blank">
<img src="{{url('frontend/icons/instagram.svg')}}" alt="">
</a>
<a href="" target="_blank">
@endif
@if(!is_null($linkedIn))
<a href="{{$linkedIn->value}}" target="_blank">
<img src="{{url('frontend/icons/linkedIn.svg')}}" alt="">
</a>
@endif
</li>
</ul>
<div class="mobile-navbar-btn ms-auto">
@ -91,11 +103,10 @@
<div class="visa-services">
<h2>Visa Services</h2>
<ul>
<li><a href="">Temporary Work Visa</a></li>
<li><a href="">Permanent Work Visas</a></li>
<li><a href="">Temporary Independent</a></li>
<li><a href="">Permanent Independent Visa</a></li>
<li><a href="">Work and Holiday Visa</a></li>
@foreach($services as $service)
<li><a href="{{url('/service/'.$service->slug)}}">{{$service->name}}</a></li>
@endforeach
</ul>
</div>
</div>

@ -3,6 +3,9 @@
<title>Aplus Agency</title>
@endsection
@section('content')
@php
$msg = Session::get('msg') ?? null;
@endphp
<!-- Slider section -->
<section class="banner-section">
<video width="100%" height="auto" id="vid" autoplay playsinline loop muted>
@ -249,18 +252,24 @@
<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>
<div class="contact-desc">
<a href="tel: +61 - 047 817 7809" class="contact-phone">
@if(!is_null($phone))
<a href="tel: {{$phone->value}}" class="contact-phone">
<img src="{{url('frontend/icons/phone-Icon.svg')}}" alt="">
<h5>+61 - 047 817 7809</h5>
<h5>{{$phone->value}}</h5>
</a>
<a href="mailto: info@aplusagency.com.au" class="contact-phone">
@endif
@if(!is_null($email))
<a href="mailto: {{$email->value}}" class="contact-phone">
<img src="{{url('frontend/icons/email-Icon.svg')}}" alt="">
<h5>info@aplusagency.com.au</h5>
<h5>{{$email->value}}</h5>
</a>
@endif
@if(!is_null($address))
<a href="https://goo.gl/maps/P4Y2PYGMpGa83L2R8" target="_blank" class="contact-phone">
<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>
@endif
</div>
</div>
</div>
@ -269,7 +278,8 @@
<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>
</div>
<form action="">
<form action="{{route('send_contact_mail')}}" method="post">
@csrf
<div class="row enquiry-form">
<div class="col-md-6">
<div class="input-group mb-3">
@ -278,7 +288,7 @@
<img src="{{url('frontend/icons/user-icon.svg')}}" alt="">
</span>
</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 class="col-md-6">
@ -288,7 +298,7 @@
<img src="{{url('frontend/icons/email-icon.svg')}}" alt="">
</span>
</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 class="col-md-6">
@ -298,7 +308,7 @@
<i class="fa-solid fa-phone"></i>
</span>
</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 class="col-md-6">
@ -308,11 +318,13 @@
<img src="{{url('frontend/icons/layers_light.svg')}}" alt="">
</label>
</div>
<select class="form-select" id="inputGroupSelect01">
<select class="form-select" id="inputGroupSelect01" name = "service_id">
<option hidden>Choose Services</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
@foreach($services as $service)
<option value="{{$service->id}}">
{{$service->name}}
</option>
@endforeach
</select>
</div>
</div>
@ -340,6 +352,8 @@
@endsection
@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>
$(document).ready(function(){
$('.slider-partners').slick({
@ -356,5 +370,15 @@
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>
@endsection

@ -58,7 +58,7 @@ Route::get('/career', [HomeController::class, 'working_dice']);
Route::post('/career', [HomeController::class, 'save_career'])->name('career');
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::get('/ndis', function(){
return view('ndis');

Loading…
Cancel
Save