Laravel vs Symfony

Which one of the frameworks is the best is a question I get asked a lot. Somehow there is a fight between them, Laravel vs Symfony.

This is a question that frequently arises. Someone will ask me “Oh, you [work with/prefer/love] Laravel?” and my answer to that is a simple yes. What baffles me is the very frequent follow up question to that, which is “Well, what about Symfony?”. Every time I get this question, I’m stricken by it because I have never understood the question. It seems like there is a battle, Laravel vs Symfony.

Custom pagination in Laravel 4

The default Laravel pagination is built for Twitter Bootstrap 2.0 and I believe that it will be updated to use Twitter Bootstrap 3.0 in Laravel 4.1 (not sure though). So what happens when you want to use the pagination but have to customize it to your needs? It’s actually really simple since Laravel allows you to specify your own pagination view where you can access the pagination object.

Get raw POST data in Laravel

I recently stumbled upon an interesting problem when trying to retrieve the raw POST body in Laravel. This happened when I was sending POST/PUT requests from AngularJS to a REST API that was built with Laravel. I did a lot of trial and error before I figured out the problem.

NPath complexity and cyclomatic complexity explained

NPath complexity and cyclomatic complexity sounds really scary, but they are fancy words for quite simple concepts, here is a simple explanation for them.

If you happen to be using PHP Mess Detector (which you should for any larger project) you have probably stumbled upon these two, but do you really know what they stand for? NPath complexity and cyclomatic complexity sounds really scary, but they are fancy words for quite simple concepts. So let’s go through them and also find out why they’re important for maintainable and testable code. Both of these concepts are used in static code analysis and are measurements of how complex a function is.

Book recommendations for developers

To me it’s essential as a developer to read books, and not just looking things up on the internet. The depth of a book can not be compared to almost anything you find on the web. Keeping your knowledge fresh is important and I tend to try to read my books as often as I feel like it and have the time. What you learn by reading a book once is nothing compared to reading it perhaps two or more times. I’ll share with you a selection of books I have, mostly in my Kindle or Leanpub library, which I’ve found to help me a lot. Some of the books are not PHP specific, but are for developers in general or about software development as a concept. Some of the books are a lot about code while others are more about getting you to think about what you’re doing and how you can improve it.