-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathShowcases.php
40 lines (37 loc) · 1 KB
/
Showcases.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
namespace App\controllers;
use Minz\Request;
use Minz\Response;
use App\auth;
use App\jobs;
use App\utils;
/**
* @author Marien Fressinaud <[email protected]>
* @license http://www.gnu.org/licenses/agpl-3.0.en.html AGPL
*/
class Showcases
{
/**
* Show a showcase page.
*
* @request_param string id
*
* @response 404 If the id doesn’t exist
* @response 200 On success
*/
public function show(Request $request): Response
{
$id = $request->param('id');
if ($id === 'navigation') {
return Response::ok('showcases/show_navigation.phtml');
} elseif ($id === 'link') {
return Response::ok('showcases/show_link.phtml');
} elseif ($id === 'contact') {
return Response::ok('showcases/show_contact.phtml');
} elseif ($id === 'reading') {
return Response::ok('showcases/show_reading.phtml');
} else {
return Response::notFound('not_found.phtml');
}
}
}