This file contains hidden or 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
| <VirtualHost *:80> | |
| # The ServerName directive sets the request scheme, hostname and port that | |
| # the server uses to identify itself. This is used when creating | |
| # redirection URLs. In the context of virtual hosts, the ServerName | |
| # specifies what hostname must appear in the request's Host: header to | |
| # match this virtual host. For the default virtual host (this file) this | |
| # value is not decisive as it is used as a last resort host regardless. | |
| # However, you must set it for any further virtual host explicitly. | |
| ServerName localhost |
This file contains hidden or 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
| vagrant@VAGRANT-BOX ~ | |
| $ cmd | |
| Microsoft Windows [Version 6.1.7601] | |
| Copyright (c) 2009 Microsoft Corporation. All rights reserved. | |
| C:\Users\vagrant>echo %cd% |
This file contains hidden or 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
| Router::scope('/users', ['controller' => 'Creators'], function (RouteBuilder $routes) { | |
| $routes->connect('/add', ['action' => 'add']); | |
| }); |
This file contains hidden or 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 | |
| $validator | |
| ->allowEmpty('number') | |
| ->add('number', 'valid', [ | |
| 'rule' => function ($value) { | |
| return preg_match('/^(((\+44)? ?(\(0\))? ?)|(0))( ?[0-9]{3,4}){3}$/', $value) === 1; | |
| } | |
| ]); |
This file contains hidden or 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 | |
| public function add() { | |
| $applicant = $this->Applicants->newEntity($this->request->data); | |
| debug($applicant); | |
| $subjects = $this->Applicants->ApplicantSubjects->Subjects->find('list'); | |
| $this->set('subjects', $subjects); | |
| $this->set('applicant', $applicant); | |
| } |
This file contains hidden or 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 | |
| $assets = array( | |
| '0' => array( | |
| 'Asset' => array( | |
| 'id' => '542273cb-2490-490d-b771-4ec767094594', | |
| 'name' => 'Congregations (Dashboard)', | |
| 'alias' => 'Congregations/dashboard', | |
| 'modified' => '' | |
| ), |
This file contains hidden or 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 | |
| //Add method | |
| public function add() { | |
| if ($this->request->is('post')) { | |
| $this->Truck->create(); | |
| if ($this->Truck->saveAssociated($this->request->data)) { | |
| $this->Session->setFlash(__('The truck has been saved.')); | |
| return $this->redirect(array('action' => 'index')); | |
| } else { | |
| $this->Session->setFlash(__('The truck could not be saved. Please, try again.')); |
This file contains hidden or 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 | |
| namespace App\View; | |
| use Cake\View\View; | |
| /** | |
| * Class HintView | |
| * | |
| * @property \Cake\View\Helper\FormHelper $Form | |
| * @property \Cake\View\Helper\HtmlHelper $Html |
This file contains hidden or 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="users index"> | |
| <h2><?php echo __('Users'); ?></h2> | |
| <?php | |
| echo "<table cellpadding='0' cellspacing='0'> | |
| <tr> | |
| <th>No</th> | |
| <th>ID</th> | |
| <th>Username</th> | |
| <th>Role</th> | |
| <th>Status</th> |
This file contains hidden or 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 | |
| class AppModel extends Model { | |
| private $sqlMap = array( | |
| 'mysql' => array( | |
| 'now' => 'NOW()', | |
| 'if' => 'IF(%1$s,%2$s,%3$s)', | |
| 'concat' => array('CONCAT(%s)', 'implode', ','), | |
| 'hour' => 'HOUR', | |
| 'year' => 'YEAR', | |
| 'date_sub' => 'DATE_SUB(%1$s, INTERVAL %2$s %3$s)', |