1
0

Added base routing + moved rekeningen

This commit is contained in:
2017-03-30 18:56:01 +02:00
parent ffe56bcf9b
commit afc472e7d7
8 changed files with 99 additions and 36 deletions

View File

@ -15,8 +15,7 @@
namespace Inforbank\Application;
use \Slim\App;
use Inforbank\Application\Helper\Klant;
use Inforbank\Application\Helper\Rekeningen;
use Inforbank\Application\Helper\Redirect;
class Main
{
@ -34,15 +33,7 @@ class Main
public function __construct(App $app)
{
$app->get('/', function ($request, $response, $args) {
// Ophalen klant
$klant = Klant::getCurrentUser();
$rekeningen = Rekeningen::getCurrentUserRekeningen();
// Render index view
return $this->renderer->render($response, 'index.phtml', [
'klant' => $klant,
'rekeningen' => $rekeningen
]);
return Redirect::create($request, $response, '/rekeningen');
})->add(new Auth\Middleware());
}
}