Skip to content

Commit 2152d78

Browse files
committed
Update Demo Page
1 parent 9989cab commit 2152d78

File tree

3 files changed

+71
-62
lines changed

3 files changed

+71
-62
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ http://app.codeigniter3.io/
7777

7878
## Screenshot Page
7979

80-
![https://i.imgur.com/eMddCEJ.jpg](https://i.imgur.com/eMddCEJ.jpg)
80+
![https://i.imgur.com/r29Hh5d.png](https://i.imgur.com/r29Hh5d.png)
8181

8282
## Serverless Version
8383

app/controllers/Welcome.php

Lines changed: 65 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -9,68 +9,72 @@
99
*/
1010
class Welcome extends HungNG_CI_Base_Controllers
1111
{
12-
/**
13-
* Welcome constructor.
14-
*
15-
* @author : 713uk13m <dev@nguyenanhung.com>
16-
* @copyright: 713uk13m <dev@nguyenanhung.com>
17-
*/
18-
public function __construct()
19-
{
20-
parent::__construct();
21-
$this->load->helper('directory');
22-
}
12+
/**
13+
* Welcome constructor.
14+
*
15+
* @author : 713uk13m <dev@nguyenanhung.com>
16+
* @copyright: 713uk13m <dev@nguyenanhung.com>
17+
*/
18+
public function __construct()
19+
{
20+
parent::__construct();
21+
$this->load->helper('directory');
22+
}
2323

24-
/**
25-
* Function index
26-
*
27-
* @author : 713uk13m <dev@nguyenanhung.com>
28-
* @copyright: 713uk13m <dev@nguyenanhung.com>
29-
* @time : 23/06/2022 08:45
30-
*/
31-
public function index(): void
32-
{
33-
$data = [];
34-
$data['author'] = arrayToObject(config_item('site_author'));
35-
$data['site_data'] = arrayToObject(config_item('site_data'));
36-
$data['tracking'] = arrayToObject(config_item('tracking_code'));
37-
$this->load->view('my_welcome', $data);
38-
}
24+
/**
25+
* Function index
26+
*
27+
* @author : 713uk13m <dev@nguyenanhung.com>
28+
* @copyright: 713uk13m <dev@nguyenanhung.com>
29+
* @time : 23/06/2022 08:45
30+
*/
31+
public function index(): void
32+
{
33+
$data = [];
34+
$data['author'] = arrayToObject(config_item('site_author'));
35+
$data['site_data'] = arrayToObject(config_item('site_data'));
36+
$data['tracking'] = arrayToObject(config_item('tracking_code'));
37+
$this->load->view('my_welcome', $data);
38+
}
3939

40-
/**
41-
* Function api
42-
*
43-
* @author : 713uk13m <dev@nguyenanhung.com>
44-
* @copyright: 713uk13m <dev@nguyenanhung.com>
45-
* @time : 23/06/2022 02:03
46-
*/
47-
public function api(): void
48-
{
49-
$response = [
50-
'code' => StatusCodes::HTTP_OK,
51-
'message' => StatusCodes::$statusTexts[StatusCodes::HTTP_OK],
52-
'info' => [
53-
'name' => 'Hung Nguyen',
54-
'email' => 'dev@nguyenanhung.com',
55-
'web' => 'https://nguyenanhung.com',
56-
'blog' => 'https://blog.nguyenanhung.com',
57-
'facebook' => 'https://facebook.com/nguyenanhung'
58-
],
59-
'data' => [
60-
'ip' => getIPAddress(),
61-
'user_agent' => $this->input->user_agent(true)
62-
]
63-
];
64-
$this->output
65-
->set_status_header()
66-
->set_content_type('application/json', 'utf-8')
67-
->set_output(json_encode($response, JSON_PRETTY_PRINT))
68-
->_display();
69-
exit;
70-
}
40+
/**
41+
* Function api
42+
*
43+
* @author : 713uk13m <dev@nguyenanhung.com>
44+
* @copyright: 713uk13m <dev@nguyenanhung.com>
45+
* @time : 23/06/2022 02:03
46+
*/
47+
public function api(): void
48+
{
49+
$response = [
50+
'code' => StatusCodes::HTTP_OK,
51+
'message' => StatusCodes::$statusTexts[StatusCodes::HTTP_OK],
52+
'data' => [
53+
'author_name' => POWERED_HUNGNG_SHORT_NAME,
54+
'author_email' => HUNGNG_EMAIL,
55+
'author_web' => HUNGNG_WEBSITE
56+
],
57+
'support' => [
58+
'issues' => 'https://github.com/nguyenanhung/codeigniter3-skeleton/issues',
59+
'wiki' => 'https://github.com/nguyenanhung/codeigniter3-skeleton/wiki',
60+
'source' => 'https://github.com/nguyenanhung/codeigniter3-skeleton',
61+
'packages' => 'https://packagist.org/packages/nguyenanhung/codeigniter3-skeleton',
62+
],
63+
'you' => [
64+
'ip' => getIPAddress(),
65+
'user_agent' => $this->input->user_agent(true)
66+
]
67+
];
68+
$this->output
69+
->set_status_header()
70+
->set_content_type('application/json', 'utf-8')
71+
->set_output(json_encode($response, JSON_PRETTY_PRINT))
72+
->_display();
73+
exit;
74+
}
7175

72-
public function command(): void
73-
{
74-
ResponseOutput::writeLn("Welcome CodeIgniter 3 Framework at Time " . date('Y-m-d H:i:s'));
75-
}
76+
public function command(): void
77+
{
78+
ResponseOutput::writeLn("Welcome CodeIgniter 3 Framework at Time " . date('Y-m-d H:i:s'));
79+
}
7680
}

composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
"type": "project",
2323
"license": "GPL-3.0-or-later",
2424
"homepage": "https://github.com/nguyenanhung/codeigniter3-skeleton",
25+
"support": {
26+
"issues": "https://github.com/nguyenanhung/codeigniter3-skeleton/issues",
27+
"wiki": "https://github.com/nguyenanhung/codeigniter3-skeleton/wiki",
28+
"source": "https://github.com/nguyenanhung/codeigniter3-skeleton"
29+
},
2530
"authors": [
2631
{
2732
"name": "Nguyen An Hung",

0 commit comments

Comments
 (0)