I was recently working on a project where the initial mockups were all built using Twig and a light weight Silex backend, but the actual application was built in Yii2. Rather than rebuild all the UI as Yii2 views, I looked into utilising the Twig elements I already had. It was a lot easier than I hoped to integrate Twig into Yii2 and I didn’t loose out on any of Yii2’s powerful view features.
16 articles tagged 'php'
Sharing data with CakePHP & Rails
Dec 12, 2013
A while ago I was involved in a project that wanted to convert a legacy CakePHP (v1.3) app into a Rails app. One of the problems we had to solve was...
Birth of PHP Dorset User Group
Nov 5, 2013
On Monday 4th November 2013, the newly formed PHP Dorset user group met for the first time. We have been referring to this as our 0th meet as originally...
CakePHP Asset Strategy - Part 2
Oct 28, 2013
The second part of an experimental CakePHP asset stragtegy loosely based on the Rails asset pipeline. Part 1 can be found here.
An apology
What can...
PHPNW13
Oct 8, 2013
PHPNW kicked off the weekend with a tutorial session on Friday. This was a great way to get a deeper look at some topics in a smaller group with more...
Your code sucks, lets fix it
Aug 1, 2013
Original
First off, I want to make sure that the original talks gets its due. You can watch it with slides on Pro Talk or via YouTube right here ...
Custom Configure files in CakePHP
Jul 16, 2013
A little while ago I wrote about using environment variables to store various sensitive information in your application without revealing it in source...
Changing Password Hash for CakePHP Auth
Jul 5, 2013
Sometimes you need to use a non-standard password hashing algorithm with the CakePHP Auth component. In the 2.3.x branch, you need to write a custom...
CakePHP Asset Strategy - Part 1
Jun 7, 2013
This is the first part in my Asset Strategy series. Read the second part here..
Introduction
I’ve always hated how the css/ and js/ directories of...
CakePHP Behaviours
Apr 29, 2013
CakePHP behaviours are great. They’re kind of like Ruby’s mixins with a splash of the observer thrown in.
They are specifically for the model, and...
CakePHP Model::read() vs Model::find()
Apr 26, 2013
One of the things to be careful of in CakePHP development is the minor differences between these 2 methods and what they actually do.
The key thing...
TIL: Why PHP still sucks sometimes!
Apr 4, 2013
While I have made my career over the last decade mostly based on PHP programming, its weird and sometimes outright insane gotcha’s still get me on a...
Add Environment variables to CakePHP
Mar 19, 2013
It should be common knowledge that you never put sensitive information into source control, but recently its been shown that many developers leave paswords...
Install PHP5.4 on OSX Mountain Lion
Mar 4, 2013
A little tip on getting PHP 5.4 installed on the latest OSX.
OSX ML ships with PHP 5.3 installed but the latest version is now on 5.4.
I’m a big fan...
Add 'on-the-fly' validations to CakePHP
Feb 15, 2013
Normally all the validation rules are stored in the model class in the validate var
<?php
public $validate = array();
However, sometimes you need to...
Redirect to where you came from in CakePHP
Jan 31, 2013
Sometimes an action or link needs to take the user back to where they came from each time rather than to an explicit location. When this happens CakePHP...