Laravel: Eloquent Sort By Relation

In Laravel 5.7, we have the Eloquent ORM to help with fetching data. However, sometimes we want to sort the data by a field in a related model and still retain the nested object structure of relations.

Continue reading “Laravel: Eloquent Sort By Relation”

CakePHP Multiple Applications On A Single Server


CakePHP is a wonderful PHP framework, but it can be serious pain in the butt when trying to get a multi application setup working. This post is just a simple redirect to a forum thread that solved a problem I had been experiencing for over a month whiles in the testing phase of an app. Continue reading “CakePHP Multiple Applications On A Single Server”

Making a KAN CMS Downloads Component

KAN CMS is a great tool with a well developed CMS interface, but there are still a few things lacking, and some of those are a great set of easy to use and integrate components. There are a few, but the documentation and tutorials on building more is a not as public as it needs to be.

A friend asked for assistance recently on how to build access the list of downloads uploaded via the CMS interface using KAN CMS RC2. After a bit of thinking, here are the options to achieve that: Continue reading “Making a KAN CMS Downloads Component”

JSON In Java. Where Should It Go?

As usual, it’s Saturday night and like the geek I am, I’m here thinking about the weirdest things. Tonight’s question is simple: “If a JSON library was to be integrated into Java SE, where would it go?”

Having worked with PHP a lot in the past year, with respect to the my current open source project KAN CMS, I find the use of AJAX and JSON to very helpful. What more, with PHP’s built in support for JSON parsing and serialization, the whole process is just fun. This got me thinking, what if a JSON library was included in the standard Java SE stack, how useful would it be, and again where would it go?

There is a public JSON library available for download and use over at, which I have used it once in a previous mini project. I found it particularly useful although I did not stress test it much, since my application was small. That notwithstanding, with the high number of Web Services that use JSON as a communication format, having a native JSON implementation in the Java SE stack would be very good to help developers easily build small application that consume these services without relying much on third party libraries, although these libraries maybe small.

About packaging, the library uses the “org.json.*” package format, so assuming Oracle decided to include that library (or another implementation) in the standard Java, I wonder: “where would they stick it?”

  • java.json.*
  • java.text.json.*
  • java.util.json.*
  • javax.json.*
  • or just keep it in org.json.* with the rest of the strange bunch?

Well, I don’t think this worth loosing sleep over, since Oracle are too busy suing Google’s arse to think about adding new libraries to the currently almost bloatware Java SE, but it certainly is something think about.

Create A Blog Site With KAN CMS 1.0 Beta RC5+

To set up a blog using KAN CMS is fairly simple with the upcoming KAN CMS RC5+, with the introduction of the Unified Articles Management. All that would be required is to setup/create a theme with Blog specific functionality and a fair bit of imagination. We will demonstrate how put together a simple theme which mimic the Enterprise WordPress Theme. Continue reading “Create A Blog Site With KAN CMS 1.0 Beta RC5+”

Deploying Application (PHP) Updates To A Server Cluster

Lukas Kahwe Smith put together a simple blog post to document some of the best practices for Deploying app updates to a server cluster, and although this is something I may not do much because I mostly work on smaller web applications, I believe the knowledge being documented here is more than invaluable.

I’m putting this up here for the benefit of myself especially (so I can find it much more easily in the future) and anyone else that might need this information. See comment 1 especially, now that is mind blowing, at least for me.

Spot The Difference: UI Improvements for KAN CMS 1.0

KAN CMS is still in much development at the moment, and the latest release focuses on fixing existing bugs and updating the general outlook of the Content Manager interface. As can be seen from the screen shots below, the original KNUST Feedback Manager has seriously been improved. Also, the entire CMS UI has been revamped a bit.

Can you spot the differences? (Indicate what you see in the comments)

Current KNUST KAN Installation

Original KNUST KAN Feedback Manager

KAN CMS Beta RC 2 UI Improvements

KAN CMS 1.0 Beta RC 2 UI Improvements - Feedback Manager

Development is still ongoing, but you can head over to the Google Project Site and download the latest release candidate. Note though, that this is a development build, and some things are definately not going to work as expected. Also some of the current reported issues on the site are yet to be fixed. But all in all, we headed for a great final release in July