Slug is the part of the URL which identifies a particular page on web or system in an easy reading form. Slug is generated based on a specific field such as article title, name, event or any relevant field. If you have a document title (CakePHP Note 2020) and you upload it into your system the uploaded document will get its own unique ID which will be used as a reference ID to access the document. A standard URL to access the uploaded document will be eg: localhost/myCake/documents/11 which 11 is an ID (auto-generated) for the uploaded document (CakePHP Note 2020). Let say that the documents table have (id, title and year), so the slug can be generated based on the title of the documents which will generate the URL as localhost/myCake/documents/cakephp-note-2020. Use the CakePHP Tools Plugin to easily generate the slug.

Add a comment

Page 1 of 7