Skip to content

Instantly share code, notes, and snippets.

View body
const body = {
'debt':
{
'docId': 'test',
'amount': {
'currency': 'PYG',
'value': 5000
},
'label': 'Deuda desde el postman',
'validPeriod': {
View gist:04e45f926dd75252c675324bf2016b70
{
"name": "cakedc\/app-builder",
"description": "CakePHP skeleton app",
"homepage": "https:\/\/cakephp.org",
"type": "project",
"license": "MIT",
"require": {
"php": ">=8.1",
"aws/aws-sdk-php": "^3.253",
"cakedc/admin": "^7.0",
View couple.php
// legacy/models/couple.php
/**
* Returns the search data for bookshelf
*
* @param string
* @param array
* @param array
* @return
* @access protected
View gist:2d8488d3f1f9204ad29b0b28663ae94c
// CouplesTable.php
$this->addBehavior('Josegonzalez/Upload.Upload', [
'photo' => [
'fields' => [
// 'dir' => Configure::read('Media.basePath'), // defaults to `dir`\
'dir' => 'photo_dir', // defaults to `dir`
'size' => 'photo_size', // defaults to `size`
'type' => 'photo_type', // d
]
View gist:0a2f7d7a9e70b14aafa0ff2532e2b25a
public function edit($id = null)
{
$couple = $this->Couples->get($id, [
'contain' => [
'Males',
'Females',
'Males.Profiles',
'Females.Profiles',
]
]
View gist:7ecee9ac310553dfc36df5e9ffca9a3a
$this->addFilter('first_name', [
'className' => 'Custom',
'method' => fn(Query $query, $field, $value, $data, $options) =>
// debug($query->contain(['Males', 'Females'])->leftJoinWith('Profiles')),
$query
->contain(['Males', 'Females'])
->leftJoinWith('Profiles')
->where([
'OR' => [
// $query->newExpr()->like($this->Males->Profiles->first_name, '%' . $value . '%'),
View CouplesController.php
'contain' => [
'Churches',
'Males.Profiles',
],
'fields' => [
'male.profile.first_name' => [
'actions' => ['index', 'csv'],
'url' => [
'action' => 'edit',
],
View EmailTaskTest.php
public function testGia(){
Configure::write('App.configs.defaultEmailSender', 'bar');
/** @var Quote $quote */
$Quote = TableRegistry::getTableLocator()->get('Quotes');
$sentQuote = $Quote->SentQuotes->newEntity([
'quote_id' => 1,
'is_broken_out' => 1,
'user_id' => 1,
]);
// debug($sentQuote);
View gist:36ca060954eda2972167afadc9353494
'headers' => 'From: sub@wwisinc.com
To: administrator@example.com
Date: Fri, 12 May 2023 15:38:28 +0000
Message-ID: <dc55b700ff764b9796731c449d4320d5@wwis-web>
Subject: Follow up mail for application #300001
MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit',
'message' => '
<!DOCTYPE html
View followups_mail.php
<table border="0" cellpadding="0" cellspacing="0" width="75%" align="center">
<tr>
<td>
<p>
</p>
<br/>
<p>
<p>
We are working on your submission
application #<?= h($accountNumber) ?>