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