Added base page layout
This commit is contained in:
@ -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());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user