13 |
14 |
15 | CodePoser
16 |
17 |
18 | A better way to build modern CodeIgniter Applications
19 |
20 |
21 |
The page you are looking at is being generated dynamically by CodePoser.
22 |
If you would like to edit this page you'll find it located at:
23 |
resources/views/welcome_message.php
24 |
The corresponding controller for this page is found at:
25 |
app/controllers/Welcome.php
26 |
If you are exploring CodePoser for the very first time, you should start by reading the CodeIgniter Guide as well as CodePoser Guide.
27 |
Page rendered in {elapsed_time} seconds. ' . CI_VERSION . '' : '' ?>
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/server.php:
--------------------------------------------------------------------------------
1 |
7 | */
8 | $uri = urldecode(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH));
9 |
10 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the
11 | // built-in PHP web server. This provides a convenient way to test a Laravel
12 | // application without having installed a "real" web server software here.
13 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
14 | return false;
15 | }
16 |
17 | require_once __DIR__.'/public/index.php';
18 |
--------------------------------------------------------------------------------
/tests/CodePoserTest.php:
--------------------------------------------------------------------------------
1 | baseUrl);
19 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
20 | curl_setopt($ch, CURLOPT_HEADER, 0);
21 |
22 | $response = curl_exec($ch);
23 |
24 | curl_close($ch);
25 |
26 | $isOk = preg_match('/CodePoser/', $response) ? true : false;
27 |
28 | $this->assertTrue($isOk);
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/tests/bootstrap.php:
--------------------------------------------------------------------------------
1 |
7 | */
8 |
9 | // Command that starts the built-in web server
10 | $command = sprintf(
11 | 'php -S %s:%d -t %s server.php >/dev/null 2>&1 & echo $!',
12 | WEB_SERVER_HOST,
13 | WEB_SERVER_PORT,
14 | WEB_SERVER_DOCROOT
15 | );
16 |
17 | // Execute the command and store the process ID
18 | $output = array();
19 | exec($command, $output);
20 | $pid = (int) $output[0];
21 |
22 | echo sprintf(
23 | '%s - Web server started on %s:%d with PID %d',
24 | date('r'),
25 | WEB_SERVER_HOST,
26 | WEB_SERVER_PORT,
27 | $pid
28 | ).PHP_EOL;
29 |
30 | // Kill the web server when the process ends
31 | register_shutdown_function(function() use ($pid) {
32 | echo sprintf('%s - Killing process with ID %d', date('r'), $pid).PHP_EOL;
33 | exec('kill '.$pid);
34 | });
35 |
--------------------------------------------------------------------------------
/webpack.mix.js:
--------------------------------------------------------------------------------
1 | let mix = require('laravel-mix');
2 |
3 | /*
4 | |--------------------------------------------------------------------------
5 | | Mix Asset Management
6 | |--------------------------------------------------------------------------
7 | |
8 | | Mix provides a clean, fluent API for defining some Webpack build steps
9 | | for your Laravel application. By default, we are compiling the Sass
10 | | file for the application as well as bundling up all the JS files.
11 | |
12 | */
13 |
14 | mix.sass('resources/assets/sass/app.scss', 'public/css');
--------------------------------------------------------------------------------