Remove example
This commit is contained in:
parent
77ce3af5ac
commit
f96a2cac05
@ -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;
|
||||
}
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
<h1>Eksempel side</h1>
|
||||
<p>Dette er en eksempel side</p>
|
||||
<p><?=$message?></p>
|
@ -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): ?>
|
||||
|
@ -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');
|
Reference in New Issue
Block a user