Category: PHP

Laravel Snippets PHP

Snippet 4: How I autoload my helper functions

I used to just load a helpers.php file in composer.json like everyone else, however the last couple years I have taken a more organizational approach.

Anthony Rappa Anthony Rappa

Anthony Rappa

2 min read
731 views

Blade Laravel PHP

Working with @blade $loops

Everyone knows about looping data in Blade files, but have you seen these lesser known features?

Anthony Rappa Anthony Rappa

Anthony Rappa

2 min read
891 views

Community PHP

Why we need multi-line short closures in PHP

PHP 8.1 is already taking shape quite well, yet there's one feature I'd love to see added, that's still being discussed: multi-line short closures.

stitcher.io

53 clicks
53 views

Community Laravel PHP

Defining Default Password Validation Rules in Laravel

In Laravel 8.43, the Password Validation Rule Object now supports the ability to define default password rules you can use across your application.

laravel-news.com

120 clicks
120 views

Alpine Livewire Laravel Javascript Blade PHP

Embracing the love between Livewire and Alpine

Building with new tools is hard, especially when it goes against what you've learned about the client and server in the past. Livewire and Alpine are built for each other and here's how you make the most of that relationship.

Anthony Rappa Anthony Rappa

Anthony Rappa

8 min read
1,473 views

Community PHP

A package to watch for file system changes in PHP

The Spatie team has released a new package called file-system-watcher. As the name implies, this package can watch changes in the file system and let you act on those changes.

freek.dev

67 clicks
67 views

Community PHP Laravel

Find N+1 problems instantly by disabling lazy loading

In the next release of Laravel 8, you can strictly disable lazy loading entirely, resulting in an exception.

laravel-news.com

66 clicks
66 views

Laravel Livewire PHP

Building a like button component with Laravel Livewire

Follow along as I create a reusable like button in Laravel Livewire that restricts clicks per IP address.

Anthony Rappa Anthony Rappa

Anthony Rappa

6 min read
1,094 views

Community Laravel PHP Eloquent Database

Laravel one-of-many relationships

This pull request to the Laravel framework provides a solution for creating one-to-one relations that are a partial relation of a one-to-many relation.

github.com

87 clicks
87 views

PHP Laravel Snippets

15 Random Laravel Snippets & Methods

I write code blocks down that I know I won't use often and will forget about. Every so often I go through them to refresh my memory.

Anthony Rappa Anthony Rappa

Anthony Rappa

2 min read
5,719 views

Community Laravel PHP

Laravel Octane v1.0 is Here

The Laravel team has been hard at work on Laravel Octane, a tool to supercharge your Laravel application's performance. After releasing the beta in April, Octane has released a stable 1.0 version!

laravel-news.com

91 clicks
91 views

Community Laravel PHP Tailwind

Simple Automatic Upgrades for Tailwind CSS with Shift

On Monday Shift officially released Tailwind Shifts for upgrading Tailwind projects all the way back to Tailwind 0.x.

laravel-news.com

91 clicks
91 views