Useful php commandline Linux User Must Know

0. php-v $ php -v PHP 5.5.22 (cli) (built: Apr 7 2015 10:29:09) Copyright (c) 1997-2015 The PHP Group Zend Engine v2.5.0, Copyright (c)...

Laravel 5 customize Authentication model

I migrated a application from Laravel 4 to Laravel 5.1. In Laravel 4 , we have User eloquent class in app/models folder. So I keep it in...

CSRF Vulnerability In Laravel 4

News from Laravel blog  On November 7th, Chris Smith (@chrismsnz) of Insomnia Security alerted the Laravel development team of a metho...

[Laravel 4] change column name in Migration

In Laravel 3, you can change column name in migration file. From Laravel 4, If you are using the renameColumn function in your migrations, y...

[Laravel 4] Class not Found error when using migrate:rollback

Run composer dump-autoload   in terminal to update autoload class file. After that, run migrate:rollback again

Generate migration from existed database in Laravel 4

Laravel supports migration function which help us manage database and collaborate with team members better. We write code to define schema...

Auto complete for Phalcon framework in Eclipse

Phalcon is a web framework implemented as a C extension , every Phalcon's fan know that. It mean we cannot view source code of framewo...

Install Phalcon & Phalcon developer tool in Ubuntu 13.10

I installed  Phalcon on Ubuntu 13.10 from   Official manual  and faced some problems may make beginner confused. I.  install Phalcon  F...

TCPDF ERROR: Some data has already been output, can't send PDF file

I faced an error when exporting PDF file: TCPDF ERROR: Some data has already been output, can't send PDF file and found the answer: ...

Performance benchmark of popular PHP frameworks

A PHP framework gives you common structures to normalise web apps, assist productivity, reduce repetitive coding and create more stable si...

strtotime(): It is not safe to rely on the system's timezone settings in cakephp

When you run cakephp application, may be you meet the follow error:   Warning: strtotime(): It is not safe to rely on the system's t...

Splat arguments in Ruby, Python, PHP

In Ruby, Splat arguments are arguments preceded by a *, which signals to Ruby: "Hey Ruby, I don't know how many arguments there a...

List all object's properties & methods in PHP

How to list all Object's properties and methods in PHP? I faced this issues when trying to build a micro framework in PHP (like fla...

[PHP] How to count the number of elements in an array?

To count the number of elements in an array, We can use count() function which is provided in PHP official library. You can also use sizeo...

Install Curl for PHP in Ubuntu

PHP supports libcurl, a library created by Daniel Stenberg, that allows you to connect and communicate to many different types of servers ...

How to install Eclipse and PDT plugin for PHP

There are a lot of IDEs for Php developer such as phpStorm, Netbeans, phpDesigner, etc. In my humble opinion, Eclipse and PDT plugin is stil...

Yii framework CHtml::image() example

CHtml::image() is helper for generate HTML img tag in Yii framework. 1.Class Reference public static string image(string $src, ...

Wordpress - Allow user to submit post from front end

Sometimes, we need to allow users to submit their posts from front end for some reasons. For example, you don't want users login to Wo...

Gii generate model and CRUD for Module

Gii is a web-based code generator tool for Yii framework to help developer create new source code easier and faster. It save developer's...

yii - role base access control for module

After adding source code for role base access control validation (RBAC validation )for application. You can check the access role in Modul...