This repository has been archived on 2023-01-06. You can view files and clone it, but cannot push or open issues or pull requests.
web/public/example.php
2022-02-08 22:59:47 +01:00

19 lines
565 B
PHP

<?php
$app = require '../app/inc.php';
// Flash a message on the next request
$app->session->flash('Eksempel', 'info');
$app->session->flash('Eksempel', 'success');
$app->session->flash('Eksempel', 'warning');
$app->session->flash('Eksempel', 'danger');
// Grab model and perform task
$model = $app->model('Example');
$message = $model->returnGivenString('Hei på deg!!');
// Render the view with prepared data
$app->view('template/header', ['title' => 'Eksempel side']);
$app->view('pages/example', [
'message' => $message
]);
$app->view('template/footer');