<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>CakePHP on php-tips.com</title>
    <link>https://php-tips.com/en/categories/cakephp/</link>
    <description>Recent content in CakePHP on php-tips.com</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Fri, 27 Mar 2026 22:46:24 +0900</lastBuildDate>
    <atom:link href="https://php-tips.com/en/categories/cakephp/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Released CakePHP Plugin - SlugGuard to Prevent User Slug and URL Route Collision</title>
      <link>https://php-tips.com/en/2026/03/27/cakephp-slug-guard/</link>
      <pubDate>Fri, 27 Mar 2026 22:46:24 +0900</pubDate>
      <guid>https://php-tips.com/en/2026/03/27/cakephp-slug-guard/</guid>
      <description>&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; I released a CakePHP 5.x plugin that validates user-input URL slugs against reserved words and application routes to prevent collisions.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/elstc/cakephp-slug-guard&#34;&gt;elstc/cakephp-slug-guard: CakePHP plugin for URL-safe slug validation and reserved-word collision prevention&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;hr&gt;
&lt;p&gt;&lt;img alt=&#34;SlugGuard - CakePHP Plugin&#34; loading=&#34;lazy&#34; src=&#34;https://php-tips.com/uploads/2026/03/cakephp-slug-guard-eyecatch.png&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;what-does-this-plugin-do&#34;&gt;What Does This Plugin Do?&lt;/h2&gt;
&lt;p&gt;In web applications, you often want to let users choose their own profile URL slug &amp;ndash; something like &lt;code&gt;example.com/nojimage&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;But if a user registers a slug like &lt;code&gt;admin&lt;/code&gt;, &lt;code&gt;login&lt;/code&gt;, or &lt;code&gt;api&lt;/code&gt;, it collides with your application&amp;rsquo;s routes and causes serious problems.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
