Base Controller

We will define base Controller class , where we pass entire container to base Controller class that can be access by all sub class controller of Base Controller. Step 1: Create a Base Controller In app/Controllers/Controller.php we will create base controller name as Controller and add following code. In Base controller constructor we are passing … Continue reading “Base Controller”

First Application

We will create our first slim application, where we will learn setting very simple slim application with popular template view called Twig. Getting Set Up Start by making a folder for your project called firstSlim. Inside our firstSlim project add following folder public, bootstrap in root folder. Add two file in public folder. Inside the bootstrap/ … Continue reading “First Application”


What is SLIM Framework? PHP micro framework that helps PHP developers quickly and easily write web applications and APIs. Think of it as a core set of tools with which a developer can build amazing things.” Called micro framework because Slim framework which focus on the basic needs required of a web application such as: … Continue reading “Slim”

Custom Php Function

1. Php function to generate a unique random number between two range and creates an array with  keys and another for its values. function uniqueNumber($min, $max, $quantity) { $numbers = range($min, $max); shuffle($numbers); return array_slice($numbers, 0, $quantity); } $pageno = array(1,2,3,4,5); $randomPageno = uniqueNumber(1,5,5); $mapPage = array_combine($pageno, $randomPageno); print_r ($mapPage); Output : Array ( [1] => … Continue reading “Custom Php Function”

Adding Multiple tags select using Tag Manager JQuery Plugin

Last few days, I am searching for a good and small plugin to add multiple select tags in an input box. The Tags Manager v3.0.2 project on GitHub link. The v3.0.2 work nicely on bootstrap 4 and JQuery 3.2.1. We can use this plugin in two ways. Using CDN of Tags Manager directly to our … Continue reading “Adding Multiple tags select using Tag Manager JQuery Plugin”

Twig Basic

Concatenate two string in Twig Not condition in twig For multiple conditions, and and or can be used: For multiple branches, elseif and else can be used like in PHP. You can also test if an array is not empty:


A template is simply a text file. It can generate any text-based format (HTML, XML, CSV, LaTeX, etc.). It doesn’t have a specific extension, .html or .xml are just fine. A template contains variables or expressions, which get replaced with values when the template is evaluated, and tags, which control the logic of the template. … Continue reading “Twig”

ionic ToastController
How to Implement Toast in Ionic

Ionic comes with a number of components, including modals, popups, and cards.  Ionic ToastController can be used to display information for the short period of time by using ToastController.  The toast is commonly used to provide feedback, error/ other messages about a particular task’s status or to simply display a short message on top of app’s content. … Continue reading “How to Implement Toast in Ionic”

JavaScript String – replace() Method

The replace() method returns a new string with some or all matches of a pattern replaced by a replacement. The pattern can be a string or a Regular Express, and the replacement can be a string or a function to be called for each match. Replace first occurrence of character var str = “hello,,”; str = … Continue reading “JavaScript String – replace() Method”

HTML DOM & addEventListener on BrowserEvent

HTML DOM events allow JavaScript to register different event handlers on elements in an HTML document. Events are normally used in association with functions, and the function will not be executed before the event occurs (such as when a user clicks a button). DOM events, we notify us of something that has taken place, each event … Continue reading “HTML DOM & addEventListener on BrowserEvent”