Category: laravel

Modeling an Aggregate with Eloquent

The Aggregate pattern is an important part of Domain Driven Design. It prevents inconsistencies and is responsible for enforcing business rules within a collection of objects. For these reasons alone, it is clear to see why it is a key component of a domain model. Architectural advice recommends that the layer containi...

Meet Elixir, the Laravel Way of Compiling Assets

Many thanks to Jad Joubran, Gabriel Zerbib, Anthony Chambers, and Scott Molinari for peer reviewing this post, and thanks to all of SitePoint’s peer reviewers for making SitePoint content the best it can be! In today’s web applications, we use a wide variety of tools to speed up the development workflow while keepi...

How Laravel Facades Work and How to Use Them Elsewhere

The Facade pattern is a software design pattern which is often used in object oriented programming. A facade is, in fact, a class wrapping a complex library to provide a simpler and more readable interface to it. The Facade pattern can also be used to provide a unified and well-designed API to a group of complex and po...

Managing Cronjobs with Laravel

There are times when your application needs to run administrative tasks periodically on the server. Whether you want to send out emails to your users or clean up the database tables at the end of the day, you will need a task scheduling mechanism to take care of the tasks, when it’s time. Cron is a task scheduler sof...

Docker and Dockerfiles Made Easy!

It’s become second nature for developers to use Virtual Machines to configure and manage their working environments. Most professionals who use VMs use Vagrant for dealing with their development environments. In this article, we’ll be moving from Vagrant to Docker, and use a small Laravel application to test that e...

Flexible and Easily Maintainable Laravel + Angular Material Apps

In this article, we’re going to set up a Laravel API with Angular Material for the front end. We’re also going to follow best practices that will help us scale with the number of developers working on the project and the complexity behind it. Most tutorials cover this topic from another perspective – they com...

BDD in Laravel: Getting Started with Behat and PhpSpec

Getting Started with BDD in Laravel Introduction BDD is a complicated subject for many developers, and getting started with it the right way often does not come easy – especially when needing to implement it into existing frameworks. This tutorial aims to help you get a BDD-powered Laravel project up and running ...

Validating your data with Respect Validation

Validation is an important aspect of every application’s interaction with data. Instead of reinventing the wheel every time, the community collaborated on some useful packages like Symfony, Laravel, Zend, etc. In this article, we’re going to introduce a new package called Respect Validation, which provides some nic...