1
0

Added base page layout

This commit is contained in:
2017-03-26 16:18:47 +02:00
parent 014adeed65
commit 90201e85cd
7 changed files with 72 additions and 15 deletions

View File

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