Categories
Development Tutorials

Getting Started with PHPUnit in Laravel

Note: I originally wrote and published this article as a Semaphore CI Community Tutorial. Introduction PHPUnit is one of the oldest and most well known unit testing packages for PHP. It is primarily designed for unit testing, which means testing your code in the smallest components possible, but it is also incredibly flexible and can […]

Categories
Development

Using Laravel 5 Middleware for Parameter Persistence

I am lucky enough to get to work on a large Laravel 5 full time in my day job, with some awesome developers.I recently came up with what is, in my humble opinion, an elegant and simple solution for what we all initiallythought was quite a complex problem. If you’ve used this trick before,or know […]

Categories
Development

php artisan serve for Laravel 5

Important: In an entertaining example of poor timing, Taylor Otwell added the serve command back into the framework shortly after I published this. There is now no need to use this package. Users of Laravel 4 will remember that it came with a fantastic little command:

Categories
Development

Laravel 4 Down Safe

Laravel is a fantastic PHP Framework that does most of the complex, and boring, application framework tasks for you, so you can focus on the application itself. One of the components it provides is a full Queue Worker system to make it very easy to add jobs into a queue and process them in the […]

Categories
Development

Sorting eager loaded records in Laravel's Eloquent.

Eloquent, which is Laravel’s ORM, has some really nice features. One of which is the [Eager Loading][eager]functionality that allows you to request all of the related records in one hit, to avoid having to makemultiple database calls for each iteration of a loop. Let’s look at a simple example which returns the latest 10 blog […]

Categories
Development

Limiting Belongs To Many database queries with Pivot table values in Laravel.

This post was updated on 2014-01-22. The Proposal that I mentioned in the original articlewas approved and then implemented by Taylor Otwell, and has since been released in Laravel 4.1.