Featured
-
Top 5 Features That Make Laravel the Best PHP Framework for Development
Laravel is a free open source Web Framework of PHP
by abhishek.tiwari.458 -
Best 5 Lightweight PHP Frameworks for REST APIs Development
Are you ready to develop the Rest AP
by ankur.kumar -
PHP: Full-Stack Framework vs Micro Framework
A web framework can be described as a software fra
by ankit.bhatia -
How to get facebook profile picture by Facebook App
If you would like to get your profile picture in f
by vivek.rastogi -
Creating RESTful API in cakephp
This tutorial will help you to learn how to create
by pushpendra.rawat
Tags
How to get the version numbers for Cakephp ?
I am writing this blog for beginners who are learning Cakephp. When you learn Cakephp then first thing that reminds is that which version are you installing Cakephp. To know the version of Cakephp let me tell you that there are two ways for getti...
How to load models in CakePHP?
I am writing this blog for them who are new to Cakephp and learning it. In Cakephp there are three ways to load models:
First way is:
App::import(): It will find and require()s the file and in order to use it you need to be instantiate the ...
How to rename a column of paginator sorting in cakephp?
This blog will help you to modify the column name of paginator sorting. I am writing this blog specially for beginners as I was also facing this small issue. If you want to rename the column then you need to pass second parameter as desired ...
5 Useful jQuery Tricks for every Programmer
jQuery is a feature-rich JavaScript library. jQuery makes the things like animation,events handling, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
Here we are sharing some useful jQuery tricks that ca...
Yii : A Futurisitic Framework
Hello Friends, As we know that PHP become one of the most popular web scripting language to develop dynamic web applications. With the advancements in technology, there are lots of frameworks introduced for PHP which provides different features. ...
Functional Programming in Cakephp
CakePhp supports functional programming. Functional Programming in CakePhp is a criterion as are crucial, logical and Object Oreinted programming. In CakePhp everything resides inside a function, in the mathematical sense. The
conseque...
Multiple File Upload in cakephp
Multiple File Upload in cakephp by one user and save the images name in one column in database :
Hello readers, This is a small blog on how to upload multiple file in cakephp. This is very simple and useful code, hope this code...
CSV helper for exporting data in cakephp
We can use CSV helper for exporting data in excelsheet in cakephp.
For using CSV helper we have to follow simple steps.
Step 1:- Firstly we have to create a file naming CsvHelper.php and have to save it in our app/view/Helper directory.
...
How to declare pagination limit in cakephp global ?
This blog will let you know how to declare pagination limit in cakephp globally. For new beginners who are learning cakephp 2.X, I am writing this blog especially for them. If you have created multiple pages which contains pagination and at last ...
PHP Magic function Construct and Destruct?
Hello Readers, today we discussed about PHP Magic function Construct and Destruct.
The most frequent of PHP's magic approach is __construct() method and __destruct(). When you've been following along with the Building Cribbb series I...
How to export data in Excel sheet from database
Hello Readers!
Here is a simple line of code to generate an excel file of data fetched from database. Users benefits with the compact and secure form of saving data.
Firstly create a helper file in view/Helper folder and paste the...
Php late static binding
Hello Readers,
Today we will discuss about PHP 5.3 new feature that is "Late static binding".
PHP 5.3 has introduced a new feature called "late static binding". late static binding can be used to call a class i...
How to export data in PDF file from database
Data fetch from database according to the user's entry in the database table in the pdf format, benefit of using this format for saving our data in compact and secure form, this will help to user to store the data in the file. Here is simple ...
Drupal 7: How to add multiple location to a single node with gmap and location?
For this you have to install these modules :-
views
geophp
geocoder
geofield
addressfield
libraries
&...
How to implement SLIM APIs with Database connectivity?
To connect slim apis with database follow the below steps:
1) Setup the slim enviornment in you system using the below URL.
http://findnerd.com/account/#url=/list/publishnode/18162/
2) Create a database name "slim".
3) Creat...
How to configure opencart 2.2.0.0 in your localhost with Virtual host
Opencart is one of the most popular E-commerce Framework in PHP. Opencart is easy to develop high level E-commerce websites. It's follow nicely defined MVC structure. This tutorial is belong to who are looking for best E-commerce solution.
...
How to delete user by using cakephp
For deleting user information in cake php by clicking on delete button we have to first pass user id in URL by using below code in our view.
<?php echo $this->Html->link('Delete',array('action'=>'del'.$user['User']['id']));
A...
SLIM and basic implementation using SWAGGER Editor
Slim is a micro framework in PHP which is used to write powerful web applications and APIs.
Slim is a simple framework that care for core necessities of a web application, receiving the HTTP request, dispatch the appropriate code and return ...
Export Selected Data into Excel Sheet or CSV file in CakePHP
Simple code to fetch selected data from database table in excelsheet in cakephp:
Step 1: To achieve this we will use csvHelper class. Now make a file named as CsvHelper.php in your app/View/Helper directory, then add the following code written...
how to install wordpress on local server
To install the wordpress on the local server you need first a local server like xampp.
XAMPP is a cross platform server for Apache, MySQL, PHP, Perl.
It a ligh weigh server which can be used to install the wordpress.
1. First you need is...
Lambdas (Anonymous functions)
The concept of lambda expression was introduced after coming the PHP version 5.3. We use generally any expression to make code cleaner and intuitive. and lambda expression helps to perform the same concept.
Lambdas (Anonymous functio...
How to remove "this email was sent using the cakephp framework"
I was facing issue when I was sending email, then I was getting message in the footer of the email. Message is "This email was sent using the cakephp framework". In order to remove this message you need to make sure that you have ...
Count the number of matching characters in two strings
There are different ways to compare two strings in PHP whether by using built-in functions like strcmp or strcasecmp of PHP or using equality operator(==). None of these methods return the number of matching characters in both the strings.
Thi...
How to create custom post type in WordPress
Custom posts type is used when we are making a new theme from html or want to add some extra feild in the made theme.Suppose we want to have a separate section for Trending News. By using Custom Post Types we can create a new custom news type of ...
Multiple Image Uploads in Cakephp
Hello Readers.! Here is a small blog on how to upload multiple images in database using cakephp.File uploading, nowadays is a very basic and common functionality. Here in this blog we will be uploading an image which will be stored on t...
How to upload multiple images in cakephp
For uploading multiple files first we have to download multipartfile master plugin file from http://www.fyneworks.com/jquery/multifile/ then we have to include its file into our code as shown below.
<script src="path/to/your/jquery....
Difference between $uses and $this->loadModel() in CakePHP
$uses:
$uses is used to load model in a controller. It defines which models the controller has access to by default. We can load multiple models easily using $uses. But it is not a good practice to load all models at once. Bes...
Resolve LOAD DATA INFILE Error : "The used command is not allowed with this MySQL version"
This article provides the solution for the issue with LOAD DATA INFILE statement. PHP provides a lots of options to import data from text files. I faced this issue while I was trying to import data from a text file (data.txt) into mysql table usi...
Methods in REST approach
REST (Representational State Transfer) is based on resources and actions. A resource can be an URL referencing a object or any entity on which we want to perform action for example: /listUser or /searchUser. Action can be one of the following:
...
Magic functions in PHP
Hello readers today we discussed about "Magic Functions in PHP".
Have you ever looked at the source code of open source PHP projects, you could have observed object methods that commence with a double underscore.
These are Magic F...
Static Keyword in object oriented programming in php
Static variables and methods is very useful feature in Php oops. We can access static method and variable outside and within class, without creating object of these class. Often, we hear about static class, but there are no class is static, actua...
Linking models in CakePhp
CakePHP provides one of the most important features. It is the ability of the model to link relational mapping. With the help of association we link between the models in CakePHP.
We can define relations between different objects in our own ap...
Model Association in Cakephp
Defining relations between different objects in our application, for instance, a state have many cities, and belongs to a country , is termed as associations. Association establish a way to represent the database table relationship inside Cakephp...
How to modify PHP settings in Ubuntu 14.04?
Modify PHP settings
PHP settings can be changed and configured using php.ini file. This blog will give you few common examples.
In PHP applications there are some case in which we might need to allow for larger upload files. Such as videos,...
What is REST?
REST stands for "Representational State Transfer". REST is the architectural pattern of the world wide web. In order to focus on the roles of components, REST ignores the details of component implementation and protocol syntax. The co...
Login Form and Authentication Application with Server Side Validation in cakephp
A Login Form that uses cakephp auth component to login and logout and access is denied if user is not authorized.
step 1: users database table.
First create users table in your database:
CREATE TABLE users (
`id` INT UNSIGNE...
How to Upload Image in cake php
Image uploading in cake php is a common task for building application and making it more interesting by using many images to the screen, so here is some line of code used for uploading an image and resize it according to user's need...
Search in cakephp
We can put a search box in our project by using the cakephp component.
It is very useful and can provide highly functionality across the controller.
All you need to do is include component in your controller and call component function to f...
What is Swagger?
Swagger an open-source specification and a framework for describing, producing, consuming, and visualizing RESTful web services. Swagger was developed for Wordnik for their developer use in development.
Swagger framework simultaneo...
Adding 'Forgotten Password' and 'Reset' To CakePHP
When you Login to a page, Sometimes you forget your password and want to reset your password. For this you have to follow followings steps to create forget password and reset to your form.
Step 1 : Create a simple login form in log...
How to edit user information in cakephp
For editing user information in cake php by clicking on edit button we have to first pass user id in URL by using below code in our view.
<?php echo $this->Html->link('Edit',array('action'=>'edit/'.$user['User']['id']));
...
cakePHP remember me login using Auth
If you select the tick in the ‘remember me’ box when you login in any web page with your Username and password, your login credentials will be saved in a cookie on this computer. This means that whenever the next time you log on to th...
How to add a new column to existing database table in Magento
Sometimes we are required to add a custom field in our database table for our extension in magento. For this purpose we will perform it with the installer. But before moving we must have concept of creating a new module in magento, considering th...
PHP - A brief Overview - Part -1
This posts will provide you a brief overview of PHP which is the most popular web development language. It is targeted to the audience having basic knowledge of programming. The readers searching for more in-depth knowledge will be disappointed.
...
Implementing Pagination in CakePHP
Pagination:
It is used to limit the number of records to be displayed in a page. In cakephp we can easily implement pagination. We can use pagination by putting the following code in controller:
public $paginate = [
'li...
How to search two or more words in php using explode and implode function ?
How to search words in php using explode and implode function?:
I am posting this blog as many php coders got stuck while searching multiple terms using implode and explode. I have the form in which users are going to search multiple terms.
...
How to reset your Magento admin password from Database?
If you forget the username or password to of the Magento admin panel,you can recover or change it from Magento database from phpyadmin. Most of the times forget password or username do not work, so we can use this method to recover magento admin ...
How to declare functions in jQuery
1. The basic JavaScript function
The simplest way to declare a function in JavaScript. In below example. we have written a simple function called abcd(x,y) which is simply taking two parameters x and y,.
function abcd(x,y) {
return (x *...
Setting cookies in php
Cookies in php is defined in the following line of code, CookieComponent is a wrapper in a PHP setcookie method.It offers user a number of methods for working with the Cookies in the document, cookies will allow user to remember their username an...
how to do save the cookies in cakephp and remember me in cakephp
In your login page you have two fields that are username/email and password in that page you have a checkbox . In that form you have a checkbox if you select that check box then your cookies will be saved in your browser for that remember me code...