2015-02-06 04:52:16 +01:00
|
|
|
<?php namespace FireflyIII\Http\Controllers;
|
2015-02-06 04:39:52 +01:00
|
|
|
|
2015-02-06 19:33:31 +01:00
|
|
|
|
2015-02-06 07:23:26 +01:00
|
|
|
class HomeController extends Controller
|
|
|
|
{
|
2015-02-06 04:39:52 +01:00
|
|
|
|
2015-02-06 07:23:26 +01:00
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Home 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!
|
|
|
|
|
|
|
|
|
*/
|
2015-02-06 04:39:52 +01:00
|
|
|
|
2015-02-06 07:23:26 +01:00
|
|
|
/**
|
|
|
|
* Create a new controller instance.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
$this->middleware('auth');
|
2015-02-06 19:33:31 +01:00
|
|
|
$this->middleware('range');
|
2015-02-06 07:23:26 +01:00
|
|
|
//$this->middleware('guest');
|
|
|
|
}
|
2015-02-06 04:39:52 +01:00
|
|
|
|
2015-02-06 07:23:26 +01:00
|
|
|
/**
|
|
|
|
* Show the application dashboard to the user.
|
|
|
|
*
|
|
|
|
* @return Response
|
|
|
|
*/
|
|
|
|
public function index()
|
|
|
|
{
|
|
|
|
// count is fake
|
2015-02-06 19:33:31 +01:00
|
|
|
$count = \Auth::user()->accounts()->accountTypeIn(['Asset account', 'Default account'])->count();
|
2015-02-06 07:23:26 +01:00
|
|
|
$title = 'Firefly';
|
|
|
|
$subTitle = 'What\'s playing?';
|
|
|
|
$mainTitleIcon = 'fa-fire';
|
2015-02-06 19:33:31 +01:00
|
|
|
$transactions = [];
|
2015-02-06 07:23:26 +01:00
|
|
|
|
2015-02-06 19:33:31 +01:00
|
|
|
return view('index', compact('count', 'title', 'subTitle', 'mainTitleIcon','transactions'));
|
2015-02-06 07:23:26 +01:00
|
|
|
}
|
2015-02-06 04:39:52 +01:00
|
|
|
|
|
|
|
}
|