Added files to initial project
This commit is contained in:
commit
0c6ddd06bb
6 changed files with 870 additions and 0 deletions
31
modules/welcome/controllers/index.php
Normal file
31
modules/welcome/controllers/index.php
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
function controller($switch='') {
|
||||
|
||||
switch($switch) {
|
||||
|
||||
default:
|
||||
|
||||
return 'Welcome to the real world!';
|
||||
|
||||
break;
|
||||
|
||||
case 'good':
|
||||
|
||||
return 'All things are good!';
|
||||
|
||||
break;
|
||||
|
||||
case 'json':
|
||||
|
||||
$data=['data' => 'Cool'];
|
||||
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
|
||||
return json_encode($data);
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue