This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$dob = explode('-', $applicationData['Applicant']['date_of_birth']); | |
$dobDayArray = explode(' ', $dob[2]); | |
$dobDay = $dobDayArray[0]; | |
$dobMonth = $dob[1]; | |
$dobYear = $dob[0]; | |
echo $this->Form->input('Applicant.date_of_birth', array( | |
'type' => 'date', | |
'dateFormat' => 'DMY', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* If this doenst work then try the below | |
*/ | |
echo $this->Form->input('Applicant.date_of_birth', array( | |
'type' => 'date', | |
'dateFormat' => 'DMY', | |
'minYear' => date('Y') - 110, | |
'maxYear' => date('Y')- 18, | |
) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function beforeSave(Model $model, array $options = array()){ | |
var_dump($model->data['User']); | |
//array (size=4) | |
// 'id' => string '66' (length=2) | |
// 'first_name' => string 'new first name' (length=14) | |
// 'last_name' => string 'new last name' (length=13) | |
// 'email' => string '[email protected]' (length=14) | |
$x = $model->find('first', array('conditions' => array($model->alias . '.' .$model->primaryKey => $model->id), 'contain' => 'User')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
convert *.jpg -resize 236 -set filename:filename '%t-%wx%h' 'resized/%[filename:filename].jpg' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var arrayToTable = function (data, options) { | |
"use strict"; | |
var table = $('<table />'), | |
thead, | |
tfoot, | |
rows = [], | |
row, | |
i, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php echo $this->url->link('product/category', 'path=96'); ?> | |
// http://example.com/category-three/ | |
<?php echo $this->url->link('product/category', 'path=63_78'); ?> | |
// http://example.com/category-one/category-two/ | |
<?php echo $this->url->link('product/category', 'path=63_78_96'); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Open a folder in termninal as a workspace then run.... | |
$ mkdir app | |
$ cd app | |
$ touch composer.json | |
Add this to composer.json | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
App::uses('MediaAppModel', 'Media.Model'); | |
App::uses('Folder', 'Utility'); | |
App::uses('File', 'Utility'); | |
/** | |
* Attachment Model | |
* | |
*/ | |
class Attachment extends MediaAppModel { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="list"> | |
<div class="item">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Debitis vero architecto et at atque deserunt consectetur provident.</div> | |
<div class="item">Doloremque eveniet, repudiandae magni consequatur illum voluptatem,ad dolor.</div> | |
<div class="item">Odit nostrum excepturi. Aspernatur, expedita impedit perferendis, pariatur aliquam sed facilis.</div> | |
<div class="item">Cumque ipsam est </div> | |
<div class="item">Nulla maxime veritatis, ut eveniet. Nobis ut consequatur cumque nulla totam nisi obcaecati, iste aliquam dolore minus consectetur, magni veritatis? Neque id, harum expedita, natus quas voluptatibus et molestias soluta!</div> | |
<div class="item">Eveniet nostrum laudantium ea repellat voluptatem consectetur quis facere animi labore! Accusantium, pariatur possimus corporis quod placeat, doloribus eum labore velit maiores autem eius deserunt, inventore unde officiis consequatur quos.</div> | |
<div class="item">Minima veniam non quis nihil placeat recusandae id e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.3.14) | |
// Compass (v1.0.1) | |
// ---- | |
$alpha: ( | |
color: "red" | |
); |