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

19 lines
565 B
PHP
Raw Normal View History

2022-01-23 21:56:36 +00:00
<?php
$app = require '../app/inc.php';
2022-01-24 15:54:26 +00:00
// Flash a message on the next request
2022-01-23 21:56:36 +00:00
$app->session->flash('Eksempel', 'info');
$app->session->flash('Eksempel', 'success');
$app->session->flash('Eksempel', 'warning');
$app->session->flash('Eksempel', 'danger');
2022-01-24 15:54:26 +00:00
// Grab model and perform task
$model = $app->model('Example');
$message = $model->returnGivenString('Hei på deg!!');
// Render the view with prepared data
2022-01-23 21:56:36 +00:00
$app->view('template/header', ['title' => 'Eksempel side']);
2022-02-08 21:59:47 +00:00
$app->view('pages/example', [
2022-01-24 15:54:26 +00:00
'message' => $message
]);
2022-01-23 21:56:36 +00:00
$app->view('template/footer');