Toggen

Selected posts

Embed Create React App SPA into CakePHP 3.8.x view

Some small changes from the old CRA version 2.x the asset-manifest.json now has an entrypoints key // view code src/Template/Assigned/schedule_edit.ctp <?php foreach ($css as $style) : ?> <?= $this->Html->css('/react' . $style, [ 'block' => true ]); ?> <?php...

CakePHP POST Failing

I was just trying to submit about 10 x 15 records... and found that cakephp was failing with a validation error. Found out it was due to the following in the php error log. [09-Jun-2016 19:16:22 Australia/Melbourne] PHP Warning:  Unknown: Input variables exceeded...

CakePHP 3 – Escape to the Global Namespace

This code in CakePHP 3: <?php $date = '31/01/1973'; $ymd = DateTime::createFromFormat('!d/m/Y', $date)->format('Y-m-d'); Causes this error Error: Class 'App\Controller\DateTime' not found This code fixes it: <?php $date = '31/01/1973'; $ymd =...

Getting CakePHP working in your Home Directory

This presumes you know about the security implications of having pages served from you home dir and have taken appropriate precautions to stop unauthorized access: # add a new directory section to apache sudo vi /etc/apache2/sites-enabled/000-default Alias /mapp/...