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

CakePHP 4 Search Plugin

This tutorial will show basic usage on how to use the search plugin in CakePHP 4. Search has become an essential tool in any web information system. There are many methods to execute search function in a web information system. Using search plugin will save more time and easier. Let assume that in this tutorial, I've users table with attributes (id, name, email, role). The search function is required to search based on name, email and role.

Add a comment

Page 1 of 6