2014-06-28 09:41:44 +02:00
|
|
|
<?php
|
|
|
|
|
2014-06-30 07:26:38 +02:00
|
|
|
use Firefly\Storage\Account\AccountRepositoryInterface as ARI;
|
|
|
|
|
2014-06-28 09:41:44 +02:00
|
|
|
class HomeController extends BaseController {
|
|
|
|
|
2014-06-30 07:26:38 +02:00
|
|
|
public function __construct(ARI $accounts) {
|
|
|
|
$this->accounts = $accounts;
|
|
|
|
}
|
|
|
|
|
2014-06-28 09:57:17 +02:00
|
|
|
public function index()
|
2014-06-28 09:41:44 +02:00
|
|
|
{
|
2014-06-28 09:57:17 +02:00
|
|
|
|
2014-06-30 07:26:38 +02:00
|
|
|
$count = $this->accounts->count();
|
|
|
|
if($count == 0) {
|
|
|
|
return Redirect::route('start');
|
|
|
|
}
|
2014-06-28 09:57:17 +02:00
|
|
|
return View::make('index');
|
2014-06-28 09:41:44 +02:00
|
|
|
}
|
|
|
|
|
2014-06-30 07:26:38 +02:00
|
|
|
public function start() {
|
|
|
|
return View::make('start');
|
|
|
|
}
|
|
|
|
|
2014-06-28 09:41:44 +02:00
|
|
|
}
|