PHP code example of locomotivemtl / charcoal-attachment
1. Go to this page and download the library: Download locomotivemtl/charcoal-attachment library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
locomotivemtl / charcoal-attachment example snippets
use Charcoal\Attachment\Traits\AttachmentAwareTrait;
use Charcoal\Attachment\Interfaces\AttachmentAwareInterface;
public function preDelete()
{
// AttachmentAwareTrait
$this->removeJoins();
return parent::preDelete();
}
/**
* Extended text class.
*/
namespace My\Namespace;
use Charcoal\Attachment\Object\Text as AttachmentText;
class Text extends AttachmentText
{
}