Remove example

This commit is contained in:
William 2022-03-14 14:21:35 +01:00
parent 77ce3af5ac
commit f96a2cac05
4 changed files with 0 additions and 41 deletions

View File

@ -1,18 +0,0 @@
<?php
use App\Core\Database;
class Example
{
public Database $database;
public function __construct(Database $database)
{
$this->database = $database;
}
public function returnGivenString(string $string): string
{
return $string;
}
}

View File

@ -1,3 +0,0 @@
<h1>Eksempel side</h1>
<p>Dette er en eksempel side</p>
<p><?=$message?></p>

View File

@ -38,7 +38,6 @@
<h4>Felles</h4>
<ul>
<li><a href="<?=$this->config['root_url']?>index.php">Forside</a></li>
<li><a href="<?=$this->config['root_url']?>example.php">Eksempel</a></li>
</ul>
<?php if ($this->user->loggedIn): ?>

View File

@ -1,19 +0,0 @@
<?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');