Categories
Slim Framework

How to deploy slim framework on CPanel

In this post, I would like to show you deploying your slim framework project to CPanel (without SSH access). In general, for CPanel, the web root directory will be  public_html directory.  Slim3 Framework Authorization with JWT (JSON Web Tokens)  So now move all the files from your slim project public directory to the public_html directory. […]

Categories
Slim Framework

Slim3 Framework Authorization with JWT (JSON Web Tokens)

In this post, I will show how you can secure your Slim3 Framework-based applications using JSON Web Token (JWT). To know more about JWT and How it works visit the official website(https://jwt.io). Download & Install We gonna use composer to download and install the Slim Framework. The easiest way to start working with Slim is […]

Categories
Slim Framework

How to enable CORS in Slim3 framework

In this post, you will learn about Cross-Origin Resource Sharing. Http requests are restricted by the same-origin policy, which means where scripts can be loaded from the same Origin. Specifically, the protocol, domain, and port must match. It means you can’t send the request to other origins, this restriction is there for a security reason, […]

Categories
Slim Framework

Creating a RESTful API with Slim Framework 3 and Eloquent

Slim is a full-featured, open-source PHP micro framework that helps you quickly write simple yet powerful web applications and APIs. It comes with a sophisticated URL dispatcher and middleware architecture that makes it ideal for static websites or API prototyping. It supports all(GET, POST, PUT, DELETE) the HTTP methods. This article examines Slim in detail, […]

Categories
Slim Framework

How to Use Eloquent in Slim Framework

The Eloquent ORM makes it incredibly easy to interact with a database. Today we’ll look at how we can use Eloquent to interact with our database inside your Slim Framework. The Eloquent ORM provides an ActiveRecord implementation to work with your database. This means that each model you create corresponds to a table in your […]

Categories
Slim Framework

How to connect to multiple Database – Slim Framework.

In the earlier post I wrote a tutorial on “how to connecting to database in slim framework“. In this post, I would like to show you, how you can connect to multiple databases in the same slim framework application. For single database connection, we have created an instance of the database and injected database object […]

Categories
Slim Framework

Creating a RESTful API with Slim Framework 3, PHP/MySQl

Slim is a full-featured, open-source PHP micro framework that helps you quickly write simple yet powerful web applications and APIs. It comes with a sophisticated URL dispatcher and middleware architecture that makes it ideal for static websites or API prototyping. It supports all(GET, POST, PUT, DELETE) the HTTP methods. This article examines Slim in detail, […]

Categories
Slim Framework

Slim3 Routes

The router component allows you to define routes that are mapped to callback handlers that should receive the request. The Slim Framework’s router is built on top of the nikic/fastroute component, and it is remarkably fast and stable. A router simply parses a URI to determine the request and gives an appropriate response to it. […]

Categories
Slim Framework

How to install Slim Framework 3

Slim is a PHP micro framework that helps you write simple web applications and APIs quickly. It comes with a sophisticated URL dispatcher and middleware architecture that makes it ideal for static websites or API prototyping. It supports all(GET, POST, PUT, DELETE) the HTTP methods. Slim requires PHP 5.5.0 or newer. This tutorial shows how […]

Categories
Slim Framework

How to configure/load database in Slim Framework 3

Slim is a full-featured, open-source PHP micro framework that helps you quickly write simple yet powerful web applications and APIs. It comes with a sophisticated URL dispatcher and middleware architecture that makes it ideal for static websites or API prototyping. It supports all(GET, POST, PUT, DELETE) the HTTP methods. In this tutorial I would like […]

Categories
Slim Framework

Slim framework 3 – Route Groups

Slim lets you group related routes. Route groups allow you to share route attributes, such as middleware or URL segments across a large number of routes without needing to define those attributes on each individual route. This article examines Slim route groups in detail, illustrating how you can use it, let’s pretend we are building […]