Simple Access Control for CakePHP3

The newest version of CakePHP doesn’t ship with built in ACL, which means you need to write your own. Personally I think this is a smart move, having looked at the one-size-fits-all solutions for previous versions of the framework and knowing that every system has different requirements, this version has good hooks and documentation on how to add something that works for your application. I thought I’d share what worked for mine. Continue reading

Change Form Input Type in CakePHP3

I’ve been having my first experiences with generated code, generating a new admin backend using CakePHP3 (yes CakePHP is still around, it’s alive and doing rather well in fact!). So far it’s going great and producing a much more complete solution than I’d have managed for myself on this timescale.

One thing is bothering me though: it guesses form input types from the database column types, which mostly works well but sometimes it picks something that doesn’t reflect the way that the user will store information in this field. It’s actually pretty easy to change the forms that get generated though, so here’s an example. Continue reading