When I create some sort of admin panel, I usually want to know not only when a user created or edited an item (post), but also who that user was.
Considering this, I always add two additional columns to my tables: created_by and updated_by. This, along with the timestamps from Laravel, is the best way to keep track of latest changes of a database record. Continue reading
Aren’t those error pages ugly when you try to link to a route that doesn’t exist? Continue reading
Well. It’s been a long time since I’ve written a post. I was busy learning Laravel… Currently, I am trying the framework by working on a CMS, and, again, I have arrived at the phase of menus. And by “menus”, I am refering to multi-level menus. In the past I have found ways to bypass this dilemma, but now my time allowed me to dive into it. Continue reading
Maybe it’s too early to make the announcement, so I hope you will all be gentle with this script. I’m not saying this is THE SOLUTION to your needs, but if you use it, I sure hope that you will also help further its development with a pull request or maybe some advice. Continue reading
I usually use the results that come from the models as objects (not as arrays). However, there are moments when I need to work with the results before sending them to the view. In this case, getting the results from the model as an array is preferable. But, when I send them to the view, I would like to work with objects. So now I need to convert the array into an object. Continue reading
I was asked to do a review for Codeigniter 2 Cookbook, written by Rob Foster and published by Packt Publishing (to be honest, I actually asked to review the book to get it for free).
I haven’t managed to keep the promise of reviewing the book in due time, but suddenly I realised that every now and then I return to the book to uncover a new programming style that makes me say: “Ahaaa”. Continue reading
Composer is the new kid on the block. Composer is a tool used to distribute and manage packages. I first heard of it while taking a look at Laravel. Composer’s power consists in the fact that the packages distributed by it are framework agnostic. Continue reading
As always, when talking about forms we also talk about validation. For a long time I’ve validated the forms inside the controllers because it is fast and simple – no more browsing between files.
But after a while you find yourself having a controller which is becoming more complex and bigger. So why not keep at least the validation rules somewhere else? Continue reading
Often times I find myself doing the same queries over and over again for each table used by an application. This is why I needed to create an “universal” model in order to avoid repetition. Codeigniter lets you do that by allowing you to create a “MY_Model” inside the core folder of your application. Continue reading
The CodeIgniter community is still thriving, despite the recent events at EllisLab (http://ellislab.com/blog/entry/ellislab-seeking-new-owner-for-codeigniter). A 3.0 version is in the works down at GitHub and a new book was just published this September by Packt Publishing. Continue reading