Complete guide to PHP Performance

I have a list of server config , tweaks and tricks for improving php performance.  

(1) A one-page opcache status page GitHub Link   Direct download 

How to speed up MySql Like query ?

For string columns, MySQL indexes the left side of a string. That means an index can speed a like query that has a wildcard on the right side:

SELECT * FROM users WHERE email LIKE "@gmail.com%"

This will be faster with an index column

Nested Set pattern for Laravel’s Eloquent ORM.

For Nested Set pattern , I would suggest to follow this links

The theory behind, a TL;DR version

An easy way to visualize how a nested set works is to think of a parent entity surrounding all of its children, and its parent surrounding it, etc. So this tree:

root
  |_ Child 1
    |_ Child 1.1
    |_ Child 1.2
  |_ Child 2
    |_ Child 2.1
    |_ Child 2.2

Could be visualized like this:

 ___________________________________________________________________
|  Root                                                             |
|    ____________________________    ____________________________   |
| ...