From PHP 5.3 we can use some amazing new interfaces so magical. One of them is ArrayAccess. This interface provides a set of methods that we can use to implement the array behavior in a stdClass. Read More

Of course, you know dangerouslySetInnerHTML attribute. This is very useful when you need to insert a custom own HTML in your page.

…is React’s replacement for using innerHTML in the browser DOM. In general, setting HTML from code is risky because it’s easy to inadvertently expose your users to a cross-site scripting (XSS) attack. So, you can set HTML directly from React, but you have to type out dangerouslySetInnerHTML and pass an object with a __html key, to remind yourself that it’s dangerous.

Read More

If you are using Nightwatch JS to test a website and you need to test an anchor nested in a unsorted list, be sure to add the name attribute in the anchor, otherwise, the click command will fail. Read More

Let’s say you are using the simple stateless component below:

Read More

I have updated to version 2.0.0 my React Switch button control component. This is a Switch control built with and for React.

In this new version, I’ve rewritten the component model with some alignment for ES6. Also, I’ve added the disabled feature. You can see a Demo example here.
Read More

MorrisJS is a simple Javascript library used to draw simple beautiful charts. It is based on Raphael Javascript library.

A few time ago, I had written the first PHP version of this library. Now, I’m glad to release the Laravel service provider version of that library.

Read More

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