staff members,senderid, documents,bug fixes, etc
This commit is contained in:
@@ -3,14 +3,42 @@
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models;
|
||||
use Session;
|
||||
|
||||
class DashboardController extends Controller
|
||||
{
|
||||
public function index(){
|
||||
$data = [
|
||||
'page_title' => 'Dashboard'
|
||||
];
|
||||
|
||||
$total_clients = Models\Client::count();
|
||||
$ussd_clients = Models\Client::where('services', 'LIKE', '%ussd%')->orwhere('services', 'LIKE', '%A2P%')->count();
|
||||
$sms_clients = Models\Client::where('services', 'LIKE', '%sms%')->count();
|
||||
$voice_clients = Models\Client::where('services', 'LIKE', '%ivr%')->count();
|
||||
$data = [
|
||||
'page_title' => 'Dashboard',
|
||||
'sms' => $sms_clients,
|
||||
'ussd' => $ussd_clients,
|
||||
'voice' => $voice_clients,
|
||||
'total' => $total_clients
|
||||
];
|
||||
|
||||
// dd($data);
|
||||
return view('dashboard.index', $data);
|
||||
return view('dashboard.index_two', $data);
|
||||
}
|
||||
|
||||
public function getEvents(){
|
||||
$event_arr = [
|
||||
[
|
||||
"title" => 'Airtel MW Top Up',
|
||||
"start" => date("Y, m, d")
|
||||
],
|
||||
[
|
||||
"title" => 'Airtel MW Top Down',
|
||||
"start" => date("Y, m, d")
|
||||
],
|
||||
];
|
||||
|
||||
return response()->json($event_arr);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user