Category / PHP

Today I’m excited to introduce you WP Bones, a plugin framework for WordPress written with Composer. WP Bones providing a set of tools and rules to facilitate the WordPress plugin. Also, the aim of Bones is to be able to write a Plugin such as Laravel Framework application.

Read More

When you are writing a Laravel package, usually you need a config file.Also, we will publish the config file in the “boot” method of the service provider.Then, in the “register” method you can get the configuration and use it when you create the instance of “Facade”. Let’s see a typical config file:

Read More

When you are using a Custom Post Type with its Custom Post Taxonomies, you could need to detect if a particular category is displayed in a post. So, I write a simple WordPress shortocode you can use to detect a particular category and then display the content of the post. To achieve that, you can add […]

Read More

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. Let’s see an example:

Read More

MorrisJS is a simple Javascript library used to draw simple beautiful charts. It is based on Raphael Javascript 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…

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

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 […]

Read More

When you would like to show a page only for a specified user or you wish to create a maintenance page, you may use this simple script:

Read More

You remember the post How to get a page/post content, don’t you? Then, we may get the page/post content by:

Read More