@extends('layouts.app')
@section('content')
<!-- Content Header (Page header) -->
<div class="content-header">
  <div class="container-fluid">
    <div class="row mb-2">
      <div class="col-sm-6">
        <h1 class="m-0 text-dark">Dashboard</h1>
      </div><!-- /.col -->
      <div class="col-sm-6">
        <ol class="breadcrumb float-sm-right">
          <li class="breadcrumb-item"><a href="#">Home</a></li>
          <li class="breadcrumb-item active">Dashboard v1</li>
        </ol>
      </div><!-- /.col -->
    </div><!-- /.row -->
  </div><!-- /.container-fluid -->
</div>
<!-- /.content-header -->
@php
  $category=DB::table('categories')->get();
  $subcategory=DB::table('subcategories')->get();
  $posts=DB::table('posts')->get();
  $ads=DB::table('ads')->get();
@endphp
<!-- Main content -->
<section class="content">
  <div class="container-fluid">
    <!-- Small boxes (Stat box) -->
    <div class="row">
      <div class="col-lg-3 col-6">
        <!-- small box -->
        <div class="small-box bg-info">
          <div class="inner">
            <h3>{{ count($category) }}</h3>

            <p>Category</p>
          </div>
          <div class="icon">
            <i class="ion ion-bag"></i>
          </div>
        </div>
      </div>
      <!-- ./col -->
      <div class="col-lg-3 col-6">
        <!-- small box -->
        <div class="small-box bg-success">
          <div class="inner">
            <h3>{{ count($subcategory) }}</h3>

            <p>Subcategory</p>
          </div>
          <div class="icon">
            <i class="ion ion-stats-bars"></i>
          </div>
        </div>
      </div>
      <!-- ./col -->
      <div class="col-lg-3 col-6">
        <!-- small box -->
        <div class="small-box bg-warning">
          <div class="inner">
            <h3>{{ count($posts) }}</h3>

            <p>Posts</p>
          </div>
          <div class="icon">
            <i class="ion ion-person-add"></i>
          </div>
         </div>
      </div>
      <!-- ./col -->
      <div class="col-lg-3 col-6">
        <!-- small box -->
        <div class="small-box bg-danger">
          <div class="inner">
            <h3>{{ count($ads) }}</h3>

            <p>Advertsment</p>
          </div>
          <div class="icon">
            <i class="ion ion-pie-graph"></i>
          </div>
         </div>
      </div>
      <!-- ./col -->
    </div>
    <!-- /.row -->
   @php
  $photos=DB::table('photos')->get();
  $videos=DB::table('videos')->get();
  $writer=DB::table('users')->where('type',0)->get();
  $website=DB::table('websites')->get();
@endphp
    <div class="row">
      <div class="col-lg-3 col-6">
        <!-- small box -->
        <div class="small-box bg-info">
          <div class="inner">
            <h3>{{ count($photos) }}</h3>

            <p>Photo Gallery</p>
          </div>
          <div class="icon">
            <i class="ion ion-bag"></i>
          </div>
		  </div>
      </div>
      <!-- ./col -->
      <div class="col-lg-3 col-6">
        <!-- small box -->
        <div class="small-box bg-success">
          <div class="inner">
            <h3>{{ count($videos) }}</h3>

            <p>Video Gallery</p>
          </div>
          <div class="icon">
            <i class="ion ion-stats-bars"></i>
          </div>
		  </div>
      </div>
      <!-- ./col -->
      <div class="col-lg-3 col-6">
        <!-- small box -->
        <div class="small-box bg-warning">
          <div class="inner">
            <h3>{{ count($writer) }}</h3>

            <p>Writers</p>
          </div>
          <div class="icon">
            <i class="ion ion-person-add"></i>
          </div>
        </div>
      </div>
      <!-- ./col -->
      <div class="col-lg-3 col-6">
        <!-- small box -->
        <div class="small-box bg-danger">
          <div class="inner">
            <h3>{{ count($website) }}</h3>

            <p>Important Website</p>
          </div>
          <div class="icon">
            <i class="ion ion-pie-graph"></i>
          </div>
         </div>
      </div>
      <!-- ./col -->
    </div>
    <!-- /.row -->
     
      <!-- right col -->
    </div>
    <!-- /.row (main row) -->
  </div><!-- /.container-fluid -->
</section>



@endsection
