1 | <!DOCTYPE HTML> |
||
2 | <!-- |
||
3 | Phantom by HTML5 UP |
||
4 | html5up.net | @ajlkn |
||
5 | Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) |
||
6 | --> |
||
7 | <html> |
||
8 | <?php |
||
9 | $data = ['title' => 'StupidlySimple PHP | Service']; |
||
10 | Core\Viewer::file('layouts/head', $data); |
||
11 | ?> |
||
12 | <body> |
||
13 | <!-- Wrapper --> |
||
14 | <div id="wrapper"> |
||
15 | |||
16 | <?php Viewer::file('layouts/top') ?> |
||
0 ignored issues
–
show
|
|||
17 | |||
18 | <?php Viewer::file('layouts/menu') ?> |
||
19 | |||
20 | <!-- Main --> |
||
21 | <div id="main"> |
||
22 | <div class="inner"> |
||
23 | <div class="contents"> |
||
24 | <h1>Introduction to Routing</h1> |
||
25 | <p>The Router is responsible for mapping incoming browser requests to particular MVC controller actions. |
||
26 | For example, the Router will map the uri <b>/home</b> to a HTML file called <b>myhomepage.html</b>. See?</p> |
||
27 | <p>The Router is among the important part in MVC frameworks. Routes are defined in the directory <code>/routes</code> |
||
28 | in the root of the StupidlySimple framework. We have several route groups defined in the folder, which is: |
||
29 | <code>api.php</code> for the use of RESTful APIs, <code>auth.php</code> for authentication related routes, |
||
30 | <code>web.php</code> for general routes and <code>hello.php</code> simply for this tutorial. |
||
31 | </p> |
||
32 | <p>Check out on how we define the web routes <a target="_blank" href="https://github.com/stupidlysimple/framework/blob/master/routes/web.php">on GitHub</a>.</p> |
||
33 | |||
34 | <h1>Router Demonstration</h1> |
||
35 | <p>We have a couple of example on how routing on StupidlySimple works:</p> |
||
36 | |||
37 | <h2>1) Remove .php from routes (View on <a target="_blank" href="https://github.com/stupidlysimple/framework/blob/master/routes/web.php#L24">GitHub</a>)</h2> |
||
38 | <p><a href="./routing" class="button">Go to /routing</a><br> |
||
39 | (Isn't it the same? Duh! But, you got the point?)</p> |
||
40 | |||
41 | <h2>2) The Hello World (View on <a target="_blank" href="https://github.com/stupidlysimple/framework/blob/master/routes/hello.php#L21">GitHub</a>)</h2> |
||
42 | <p><a href="./hello" class="button">Go to /hello</a></p> |
||
43 | |||
44 | <h2>3) Route /hello/yourname (View on <a target="_blank" href="https://github.com/stupidlysimple/framework/blob/master/routes/hello.php#L24">GitHub</a>)</h2> |
||
45 | <p><a href="./hello/Adam" class="button">Go to /hello/Adam</a><br> |
||
46 | (See <a href="controller">Controller</a> to understand how this works)</p> |
||
47 | </div> |
||
48 | </div> |
||
49 | </div> |
||
50 | |||
51 | <?php Viewer::file('layouts/footer') ?> |
||
52 | |||
53 | </div> |
||
54 | |||
55 | <?php Viewer::file('layouts/scripts') ?> |
||
56 | </body> |
||
57 | </html> |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths