Skip to content

Commit cde9238

Browse files
authored
Update auto_routing_improved.html
Added note, that namespaces must be adjusted
1 parent e5357a3 commit cde9238

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

docs/incoming/auto_routing_improved.html

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,22 @@ <h2><a class="toc-backref" href="#id22" role="doc-backlink">Organizing Your Cont
749749
<div class="admonition important">
750750
<p class="admonition-title">Important</p>
751751
<p>Directory names MUST start with an uppercase letter and be CamelCase.</p>
752+
<p>Namespaces need to updated to reflect the current namespace</p>
753+
<div>
754+
<pre>&lt;?php
755+
756+
namespace App\Controllers\<strong>Products</strong>;
757+
758+
<strong>use</strong> App\Controllers\BaseController;
759+
760+
class Home extends BaseController {
761+
public function getIndex() {
762+
echo "Products";
763+
}
764+
765+
}
766+
</pre>
767+
</div>
752768
</div>
753769
<p>When using this feature the first segment of your URI must
754770
specify the directory. For example, let’s say you have a controller located here:</p>
@@ -976,4 +992,4 @@ <h4><a class="toc-backref" href="#id31" role="doc-backlink">Disable Translate UR
976992
</script>
977993

978994
</body>
979-
</html>
995+
</html>

0 commit comments

Comments
 (0)