master
Mahesh Sharma 2 years ago
parent e269f8c285
commit 67612b1116
  1. 11
      app/Http/Controllers/Admin/HomeController.php
  2. 37
      resources/views/admin/index.blade.php
  3. 2
      resources/views/blogs.blade.php

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

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

@ -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>

Loading…
Cancel
Save