Skip to content
  • Archives
  • Buy Adspace
  • Contact me
  • Hide Ads for Premium Members

zen of coding

holistic web development

  • Archives
  • Buy Adspace
  • Contact me
  • Hide Ads for Premium Members

Day: September 16, 2008

  • Home
  • 2008
  • September
  • 16
CakePHP

Nice trick to toggle your Model field in CakePHP

September 16, 2008June 20, 2013 vladko

This little trick will allow you toggle any field, for example ‘status’ which can be either 0 or 1… Add this little function to your

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Email a link to a friend (Opens in new window) Email

Like this:

Like Loading…
Read More
CakePHP

Use Sanitize::html() class in the views

September 16, 2008 vladko

Update (9/16/2008): As some people pointed out it’s easier to use the h() method defined in basics.php of the core, it achieves the same basic

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Email a link to a friend (Opens in new window) Email

Like this:

Like Loading…
Read More
CakePHP

Use Set::merge() to modify the $paginate property

September 16, 2008 vladko

Let’s say you have a Posts controller, where you’ll need to paginate some posts in various actions. You might have some “generic settings” as the

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Email a link to a friend (Opens in new window) Email

Like this:

Like Loading…
Read More

New Posts

  • I don’t bother with “whiteboard interviews”.
  • PHP MVC Frameworks preview of 2018 (Phalcon 3, Symfony 4, Laravel 5.x and others)
  • Case study: building a better search with Algolia and Lumen PHP
  • The State of PHP MVC Frameworks in 2017 (Laravel, Symfony, CodeIgniter, CakePHP, Zend)
  • The great PHP MVC Framework Showdown of 2016 – (CakePHP 3 vs Symfony 2 vs Laravel 5 vs Zend 2)

Top Posts & Pages

  • The great PHP MVC Framework Showdown of 2016 - (CakePHP 3 vs Symfony 2 vs Laravel 5 vs Zend 2)
  • PHP MVC Frameworks preview of 2018 (Phalcon 3, Symfony 4, Laravel 5.x and others)
  • Redirecting to the home page
  • JQuery in the CakePHP world (part 1 - the basics)
  • "Error: Database connection "Mysql" is missing, or could not be created". CakePHP 2.0 -- cake bake trouble
  • Easy CakePHP logging to FireBug with DebugKit and FirePHP
  • Upgrading Ubuntu to 14.04, 500 errors because of .htaccess and other fun things...
  • User Auth with CakePHP 2.1 – part 2
  • Building "the blog tutorial"... the TDD way (part 1 - model testing)
  • I can't get my estimations right... Top issues and remedies
September 2008
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  
« Aug   Oct »
All Rights Reserved 2024.
Proudly powered by WordPress | Theme: Fairy by Candid Themes.
%d