<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\ActivityLog;

class ActivityController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        //
        $activities = ActivityLog::with('admin')->where('user_type', 'admin')->orderBy('created_at', 'desc')->paginate(30);
        $data = [
            'activities' => $activities,
             'page_title' => 'Admin Activity Log'
        ];
        return view('activity.index', $data);
    }

}
