Categories
Development LaraSec Security

Why Parameterised Queries Are Important

This is the fourth security tip from my Laravel Security in Depth newsletter, sent out to all subscribers on October 8th. Please subscribe if you’d like these tips delivered weekly. Laravel provides an expressive fluent interface for building database queries, either as raw queries through the query builder or as part of Eloquent (Laravel’s Object-Relational Mapper, ORM). The query builder allows […]

Categories
Development Security

Using a Custom Key for Encrypted Cast Model Attributes in Laravel

This is the first security tip from my Laravel Security in Depth newsletter, sent out on Monday to all subscribers. Please sign up if you’d like these tips delivered weekly. Laravel allows you to cast model attributes as encrypted strings, when stored in the database. This gives you added security for any values that are […]

Categories
Security

Introducing Laravel Security in Depth

I’d like to introduce a new project I’ve just started: Laravel Security in Depth. It’s something I’ve never tried before, or even considered as an option until recently, and I’m very excited to dive into it and see how it grows. What is Laravel Security in Depth? Laravel Security in Depth is a paid mailing […]

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.