This creates comments_comments. The default connection must point to the same database used by your application. For another connection, add -c connection_name to the migration command and configure the Comments table to use that connection.
The examples use an existing Posts table and an existing Users table with integer user IDs. Comments can belong to other application models, but the plugin does not create your application tables or authentication system. Read Models and migrations before migrating if the records receiving comments use UUIDs.
Installation
Install the plugin in your CakePHP application:
Composer checks the supported PHP and CakePHP versions. See composer.json for the dependency constraints.
Create the comments table
If your application does not already have the Migrations plugin, install and load it:
Run the Comments migrations:
This creates
comments_comments. The default connection must point to the same database used by your application. For another connection, add-c connection_nameto the migration command and configure the Comments table to use that connection.The examples use an existing
Poststable and an existingUserstable with integer user IDs. Comments can belong to other application models, but the plugin does not create your application tables or authentication system. Read Models and migrations before migrating if the records receiving comments use UUIDs.Continue
Follow Getting started to display and submit comments on a post. Admin access is disabled until you configure its access callback.