Category: Blog

Laravel View X-Ray

Laravel View X-Ray is a package for Laravel 5.6 by Marcel Pociot which enables you to peek into your Laravel views and find out which template matches a specific part of the HTML output. After installing the package it’s enabled by default in development, and then you can hit Cmd + Shift + X (Ctrl + Shift + X on Windows). Note, at the time of writing the View X-Ray package depends on jQuery. The result is a beautiful visual representation of your view, and it’s easy to understand the view hierarchy at a glance now with X-Ray enabled....

Read More

Count Models With the Laravel Visits Package

Laravel Visits is a package by Bader Almutairi for attaching counters to any model to track visits with tags. The main features this package provides, include the following: A model item can have many types of recorded visits (using tags). It’s not limited to one kind of Model (like some packages that allow only User model). Record per visitors and not by visits using IP detecting, so even with refresh visit won’t duplicate (can be changed from config). Get Top/Lowest visits per a model. Get most visited countries … Get visits per a period like a month of a...

Read More

New Outer Array Functions Coming to PHP 7.3

PHP 7.3 introduces two new array functions for working with the “outer” keys of an array. The RFC proposal included four new functions for both keys and values, but only the array key functions were accepted: array_key_first() (accepted) array_key_last() (accepted) array_value_first() (declined) array_value_last() (declined) Although the outer array value functions were declined, at least new functions will be available for getting the outer keys of an array. New Accepted Array Key Functions First, let’s look at the array_key* functions. These functions allow you to get the first and last key respectively. For an associative array, here’s an example: $array...

Read More

MySpace and the Coding Legacy it Left Behind

For an entire generation, MySpace was a gateway to the addictive social networking platforms that are now a ubiquitous feature of our lives. And for many members of that same generation, MySpace was a gateway to another inescapable part of modern life—writing code. Since the site’s demise nearly ten years ago, certain totems of the MySpace experience have stuck in our collective memories—e.g. the top 8, auto-playing music, and, of course, Tom. But of all the features that made MySpace the cultural sensation that it was, the ability to style a profile page with HTML and CSS might have...

Read More

Laravel Query Builder

Laravel Query Builder is a package by Alex Vanderbist and the folks at Spatie, to quickly build Eloquent queries from API requests. This package makes creating complex API queries with Laravel incredibly simple. While you may have already heard of this package (or used it), I wanted to make sure everyone is aware of this one! I highly recommend you take Query Builder for a spin and read through the README to learn what it’s capable of doing. It makes creating API filters and other query-related tasks so easy, you might feel like you’re cheating. A few basic examples...

Read More