<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use DB;
use Session;
class countcontroller extends Controller
{
//
public function count_categories(){
$categories=DB::Table('categories')->get();
$count=count($categories);
return $count;
}
public function count_products(){
$products=DB::Table('products')->get();
$count=count($products);
return $count;
}
public function count_users(){
$users=DB::Table('users')->get();
$count=count($users);
return $count;
}
public function count_orders(){
$orders=DB::Table('orders')->get();
$count=count($orders);
return $count;
}
public function count_sms(){
$bucket=DB::Table('bucket')->get();
if(count($bucket)>0){
return $bucket[0]->qty;
}
else{
return 0;
}
}
public function count_email_subscribers(){
$subscribers=DB::Table('subscribers')->where('active_flag','Y')->get();
$count=count($subscribers);
return $count;
}
public function count_email_unsubscribers(){
$subscribers=DB::Table('subscribers')->where('active_flag','N')->get();
$count=count($subscribers);
return $count;
}
public function count_email_sents(){
$emails=DB::Table('emails')->get();
$count=count($emails);
return $count;
}
}
Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]