Narendra Vaghela Blog


CakePHP: Execute Shell Command from Controller

CakePHP provides a full featured console tools to execute tasks such as cron job, sending weekly emails or any background process which does not require http request handling. It provides several basic core Shells...


CakePHP: Build REST APIs with RestApi plugin – Part 2

This is the second part of tutorial. If you haven’t look at first part, please read it here – CakePHP: Build REST APIs with RestApi plugin – Part 1 Okay, so let’s start with user...


CakePHP: Build REST APIs with RestApi plugin – Part 1

A guide to build REST APIs in CakePHP 3 application using RestApi plugin. In this part, we will setup a fresh CakePHP application and install RestApi plugin. Setup the application In this step, we...


AngularJS: How to use ternary operator in template

AngularJS now supports a ternary condition in its expressions. The basic syntax is as below.

Let’s see some examples.

Above expression will check if there is a value set in bioText...


CakePHP: Send transactional emails using Mailgun

Sending email is a basic need of every application. Examples of transactional emails are Receipts, Password Resets, Signup Confirmation Emails etc. Why should we use transactional email service providers? There is another options to...


CakePHP: How to use/access view variables inside a Helper

In CakePHP 3 application, you can use the your view variables inside a Helper. There are 2 ways to access/use view variables in our Helper. 1. Access view variable using class property like $this->_View->viewVars You can...


Strong password generator

Just created a password generator tool. Password Generator You can generate a password online with random string. Just select password length and hit Generate button. You can also make your password even more complex...


AngularJS: Remove # from URL

AngularJS builds URL with hashtag by default. To remove hashtag (#) from URL, there are 2 steps. 1) Set base for links In your main HTML file, add the <base> tag in <head> section. This...


How to fix cURL error 60: SSL certificate problem

Sometimes, when we make a curl call to third party services, we get an error curl: (60) SSL certificate : unable to get local issuer certificate. This error occurs because the curl verifies and...


SparkPost plugin for CakePHP 3

Just created another plugin for CakePHP 3 to send the emails using SparkPost service. Find the detailed usage details and installation manual at my GitHub project: