This manual page deals with the installation of the Proffer plugin. Where you can get the code and where should it be in your project.
You can find it on Packagist https://packagist.org/packages/davidyell/proffer
In your terminal you can use
$ composer require 'davidyell/proffer:^0.8'
It's always advised to lock your dependencies to a specific version number. You can check the releases, or read more about versions on Composer.org. For more information about installing plugins with CakePHP, check the book.
Then you'll need to load the plugin in your config/bootstrap.php
file.
Plugin::load('Proffer');
Next you need to add the fields to your table. You'll want to add your file upload field, this will store the name of the
uploaded file such as example.jpg
and you also need the dir field to store the directory in which the file has been
stored. By default this is dir
.
An example query to add columns might look like this for MySQL.
ALTER TABLE `teams`
ADD COLUMN `photo` VARCHAR(255),
ADD COLUMN `photo_dir` VARCHAR(255)
Don't forget to ensure that the fields are present in your entities $_accessible
array.