Laravel.io
<?php namespace SGProject\Http\Controllers;

use Queue;
use SGProject\Models\Module;
use SGProject\Models\Contactform;

class AdminController extends Controller {

	/*
	|--------------------------------------------------------------------------
	| Admin Controller
	|--------------------------------------------------------------------------
	|
	| This controller renders your application's "dashboard" for users that
	| are authenticated. Of course, you are free to change or remove the
	| controller as you wish. It is just here to get your app started!
	|
	*/

	/**
	 * Create a new controller instance.
	 *
	 * @return void
	 */
	public function __construct()
	{
        parent::__construct();

		$this->middleware('auth');

        $contact_count = Contactform::notAnsweredContactforms()->count();
        view()->share('contact_count', $contact_count); 
	}

     /**
	 * Show the application dashboard to the user.
     *
     * @return Response
     */
    public function dashboard()
    {
        $modules = Module::onDashboard()->orderBy('title')->get();

        foreach ($modules as $key => $value)
        {
        	$model = "SGProject\Models\\".$value->model;
            $modulData = $model::all();
            $stats[$key]['title'] = $value['title'];
            $stats[$key]['count'] = $modulData->count();

            $last = $modulData->last();

            if(isset($last))
            {
                $stats[$key]['last_entry'] = $last->title;
                $stats[$key]['last_update_at'] = $last->updated_at;
                $stats[$key]['last_update_by'] = $last->updated_by_slug;
            }
        }
       
        return view('pages.dashboard')->with(compact('stats'));
    }

Please note that all pasted data is publicly available.