Visualize your models

By Andy, filed under CakePHP, Tools

Happy new year!

Way back in December I found an awesome article by Cakeexplorer on a script to build an image of your db schema. I had been meaning to write such a script for some time, it was great to have it already ticked off the to-do list.

There was one thing that I didn't like too much: it ran off the tables in the db rather than the models in your app/models...

read more2 comments

  • Speed up your dev: write custom bake templates

    By Andy, filed under CakePHP, Tools

    When I first started using cake, bake wasn't around. It took quite some time for me to decide to give it a go, but at that time what bake gave wasn't customizable, as such it's use was limited since it took nearly as much time to bake and edit the files as it did to just write the files (once you know what you are doing that is). Roll the clock forward a bit and bake ...

    read more5 comments

  • Don't mail me my site errors

    By Andy, filed under CakePHP, Tools, Error, Logs, Database

    I wrote recently about how to have your site(s) email you whenever a problem occurs. Trouble is "problem" turns out to be a rather broad scope. If you have a missing file or fundamental problem of some kind, you would want to know so you can fix it; if there was a dead link on your site, you would also want to fix it; if someone just mistypes the url (or follows a link...

    read more0 comments

  • Email me my site errors

    By Andy, filed under CakePHP, Tools, Error, Logs

    Have you ever wondered what the reason for that 404 error is when you set debug to 0, or when you move your site onto your live server? How many visitors/clients are confronted by a 404 when they should be looking at the fruits of your work? Cake allows you to modify what happens in the case of an error, and the purpose of this post is to show how to make your site mail you ...

    read more2 comments

  • Working with Tree data (MPTT)

    By Andy, filed under CakePHP, Tools, MPTT

    In the past week, a lot happened to this site, and not all of it was good :). Where to begin... the development machine died (hopefully get it back today); I moved all the code from a backup onto my aging laptop, my previous host account expired; I changed hosts to Dreamhost, the update from my laptop to the live version included some code that doesn't work/isn't finished; I...

    read more11 comments

  • Mini Controllers - modular page design

    By Andy, filed under CakePHP, Tools, requestAction

    The MVC pattern adds some clarity to what should go where when it comes to designing a page which requires some data from a data source. The model gets the data from the data source; the controller might do something with that data and then the view will display what the controller passes to it. If the page handles only a single function that's rather easy to both ...

    read more11 comments

  • Return of the Demos

    By Andy, filed under CakePHP, Tools, Tips, Plugins

    A brief not to say that I'll be putting a couple of Demos back on the site, and I'll be adding to the main demo page as I go. All of the demos will be put up as plugins.

    The pagination demo and source has always been available, and adding to that, the the next example is the Title tutorial. A very simple example based on the original tutorial from the wiki...

    read more11 comments

  • Change the config at run time

    By Andy, filed under CakePHP, Tools, Tips, Database

    Following on from my previous post, I thought I'd mention a similar use that can make a developers life a little easier. Usually when developing software there are at least 3 environments: Development, Test and Production. For larger projects there may be more, but for a simple website (and a tiny team of 1) there is often 2 environments: the one on the development machine...

    read more5 comments

« 1 | 2