What are Laravel Filters?

what are laravel filters

Filters are really a fantastic resource to use in Laravel. In fact, almost all applications will use them in one way or another. Filters give you the ability to tap into the routing lifecycle within Laravel and take actions based on various conditions both before and after the route request and response. We also saw in the last episode on Larvael Cache techniques, that we can combine the use of filters and caching together.…

Laravel Cache Tutorial

laravel cache tutorial

Let’s take a moment to talk about cache. Now when we say cache, we’re not talking about dollar bills, although that’s what it sounds like! Caching is the act of transparently storing data for future use in an attempt to make applications run faster. There are all kinds of ways to cache data, and Laravel makes it easy to do so with just a small number of method calls.…

Laravel Event Listeners

Laravel Event Listeners

When using Laravel, there is a great way to listen for events and then take actions based on those events by using the Event Facade. This is also known as an Observable Implementation. By using the Event Facade, we can listen for or subscribe to events that may occur, and then immediately take action. It’s a great way to keep your code clean, as well as having a dedicated class to handle events.…

Laravel Repository Pattern

repository pattern

The Repository Pattern can be very helpful to you in order to keep your code a little cleaner and more readable. In fact, you don’t have to be using Laravel in order to use this particular design pattern. For this episode however, we will use the object oriented php framework Laravel to show how using repositories will make our controllers a bit less verbose, more loosely coupled, and easier to read.…

Laravel File Structure

laravel file structure

When working on applications and websites, we usually follow some type of convention for organizing files and assets that support the site. You might be familiar with how Codeigniter, CakePHP, or your own home grown solutions work. The MVC architecture has been the de facto design standard for some time now. Of course MVC is our Model, View, Controller design pattern that separates Data, Presentation, and Routing apart to make things easier to control.…