I love Laravel, and you? Overall, the Facades feature! When you use a facade like some Eloquent model, you have noticed the following case:

Here, we have two feature very important and useful:

  • the chain
  • the call to the static method where, and the call to the instance method where

Now, the chain is clear. It is very easy to implement. In fact, you need only return the $this pointer in your methods. Let me show an example: Read More

I spent a lot of time to translate my previous PHP code from cURL in Guzzle Http. So, beware because if you use Guzzle you have to use a request in multipart. For example, this was my previous code: Read More

Useful Laravel PHP artisan command to handle supervisor. Download here.

Actions and filters are so awesome in WordPress. They provide a very simple and powerful way to customization the WordPress core. So, Plugins and themes can execute code before or after specified event or change the result of many core functions. On the web, I found few discussion about the Javascript porting of actions and filters. Read More

Here you’ll find some useful jQuery snippets for document loaded.

jQuery Document Ready

Read More

Here you’ll find the list of actions run during a typical request by frontend.

Here you’ll find the actions run during a typical request in backend admin area.

Edit your wp-config.php file, located in WordPress root folder, and add or replace define('WP_DEBUG', true);

In this way WordPress will print the logs on the screen. This may be very annoying, so you would like to redirect all logs in a file.

As usual, please don’t hesitate to leave any questions or comments in the feed below, and I’ll aim to respond to each of them.

MySQL provides a very simple method to select rows in random order. It uses the ORDER BY RAND()statement. If you will be used theORDER BY RAND() statement, MySQL will create a temporary table with all results, then will be assigned a random index to each row and finally will return the random rows! This makes the ORDER BY RAND() quite slow. In fact, some developer prefers alternative techniques, such as PHP random functions or special SQL select.

Read More