Skip to content
This repository has been archived by the owner on Nov 16, 2022. It is now read-only.

Latest commit

 

History

History
47 lines (33 loc) · 1.72 KB

installation.md

File metadata and controls

47 lines (33 loc) · 1.72 KB

Installation

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.

Packagist

You can find it on Packagist https://packagist.org/packages/davidyell/proffer

Getting the plugin

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.

⚠️ Installing the plugin without the use of Composer is unsupported, you do so at your own risk.

CakePHP

Then you'll need to load the plugin in your src/Application.php file.

$this->addPlugin('Proffer');

or you can use the console to do this for you.

bin/cake plugin load Proffer

Database

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.

< Readme | Configuration >